-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Node Push Data #7
Comments
yes! unless you disconnect the connection will stay open and receive messages. lnsocket_recv will return a ln tlv packet with the type decoded. if you just keep calling that function you can get all incoming packets. see lnrpc.c to see how that works, you'll notice it listens for many commando packets and discards non-commando packets like pings. one thing to note is that CLN will disconnect you if you don't respond to pings, and the library doesn't currently do that for you. |
How this might work: lnsocket client connects with a specific pubkey (once we have that feature), or send a packet with an auth token/rune. The plugin then registers that node for notifications. Once you get a notification on the plugin side it then sends a packet to that registered node. I haven't done something like this yet but would be cool to see how to do it on the plugin side... You could use the |
Awesome! Thanks for the detailed replies. I will give the |
On Mon, Jul 11, 2022 at 03:47:36PM -0700, Aaron Barnard wrote:
I don't know c, but will try and grok what is going on as best I can.
ah yeah perhaps I could put together a js demo that listens to and prints lightning messages...
|
That would be amazing 🙏 |
Is it possible for this library to receive a message from the remote node it is connected to? My use case would be to have a plugin running on the coreln node that listens for events and would then push those events over the lnsocket. Is that possible?
The text was updated successfully, but these errors were encountered: