core-lightning/doc/lightning-ping.7
Rusty Russell 2ddecdc95a doc: schemas for everything else.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Fixed: doc: Epic documentation rewrite: each now lists complete and accurate JSON output, tested against testsuite.
2021-06-25 09:49:33 +09:30

74 lines
1.4 KiB
Groff
Generated

.TH "LIGHTNING-PING" "7" "" "" "lightning-ping"
.SH NAME
lightning-ping - Command to check if a node is up\.
.SH SYNOPSIS
\fBping\fR \fIid\fR [len] [pongbytes]
.SH DESCRIPTION
The \fBping\fR command checks if the node with \fIid\fR is ready to talk\. It accepts the following parameters:
.RS
.IP \[bu]
\fIid\fR: A string that represents the node id;
.IP \[bu]
\fIlen\fR: A integer that represents the length of the ping (default 128);
.IP \[bu]
\fIpongbytes\fR: An integer that represents the length of the reply (default 128)\.
.RE
.SH EXAMPLE JSON REQUEST
.nf
.RS
{
"id": 82,
"method": "ping",
"params": {
"len": 128,
"pongbytes": 128
}
}
.RE
.fi
.SH RETURN VALUE
On success, an object is returned, containing:
.RS
.IP \[bu]
\fBtotlen\fR (u16): the answer length of the reply message (including header: 0 means no reply expected)
.RE
On failure, one of the following error codes may be returned:
.RS
.IP \[bu]
-32602: Error in given parameters or unknown peer\.
.RE
.SH EXAMPLE JSON RESPONSE
.nf
.RS
{
"totlen": 132
}
.RE
.fi
.SH AUTHOR
Vincenzo Palazzo \fI<vincenzo.palazzo@protonmail.com\fR> wrote the initial version of this man page, but many others did the hard work of actually implementing this rpc command\.
.SH SEE ALSO
\fBlightning-connect\fR(7)
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:78bf096eeb9c1d5f6734486cd9d925f3dc58ca8dfe0f54be0a5369242fbc3b7d