Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
LIGHTNING-DEV-SENDCUSTOMMSlightning-dev-sendcustLIGHTNING-DEV-SENDCUSTOMMSG(7)

NAME
       lightning-dev-sendcustommsg - Low-level interface to send protocol mes-
       sages to	peers

SYNOPSIS
       dev-sendcustommsg node_id msg

DESCRIPTION
       The dev-sendcustommsg RPC method	allows the user	 to  inject  a	custom
       message	into  the  communication with the peer with the	given node_id.
       This is intended	as a low-level interface to implement custom  protocol
       extensions on top, not for direct use by	end-users.

       The  message  must  be a	hex encoded well-formed	message, including the
       2-byte type prefix, but excluding the length prefix which will be added
       by the RPC method. The messages must not	use even-numbered types, since
       these may require synchronous handling on the receiving side,  and  can
       cause  the connection to	be dropped. The	message	types may also not use
       one of the internally handled types, since that may cause  issues  with
       the internal state tracking of c-lightning.

       The  node specified by node_id must be a	peer, i.e., it must have a di-
       rect connection with the	node receiving the RPC call, and  the  connec-
       tion  must be established. For a	method to send arbitrary messages over
       multiple	hops, including	hops that do not understand  the  custom  mes-
       sage,  see the createonion and sendonion	RPC methods. Messages can only
       be injected if the connection is	handled	by openingd or channeld.  Mes-
       sages  cannot be	injected when the peer is handled by onchaind or clos-
       ingd since these	do not have a connection, or are  synchronous  daemons
       that do not handle spontaneous messages.

       On  the	reveiving end a	plugin may implement the custommsg plugin hook
       and get notified	about incoming messages.

RETURN VALUE
       The method will validate	the arguments and queue	the message for	deliv-
       ery through the daemon that is currently	handling the connection. Queu-
       ing provides best effort	guarantees and the message may not  be	deliv-
       ered  if	 the connection	is terminated while the	message	is queued. The
       RPC method will return as soon as the message is	queued.

       If any of the above limitations is not respected	the method returns  an
       explicit	error message stating the issue.

AUTHOR
       Christian Decker	_decker.christian@gmail.com> is	mainly responsible.

SEE ALSO
       lightning-createonion(7), lightning-sendonion(7)

RESOURCES
       Main web	site: https://github.com/ElementsProject/lightning

						LIGHTNING-DEV-SENDCUSTOMMSG(7)

NAME | SYNOPSIS | DESCRIPTION | RETURN VALUE | AUTHOR | SEE ALSO | RESOURCES

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=lightning-dev-sendcustommsg&sektion=7&manpath=FreeBSD+13.0-RELEASE+and+Ports>

home | help