2020-08-31 14:42:28 +02:00
.TH "LIGHTNING-PING" "7" "" "" "lightning-ping"
.SH NAME
lightning-ping - Command to check if a node is up\.
.SH SYNOPSIS
\fB ping\fR \fI id\fR [len] [pongbytes]
.SH DESCRIPTION
2020-09-07 12:46:28 +02:00
The \fB ping\fR command checks if the node with \fI id\fR is ready to talk\. It accepts the following parameters:
2020-08-31 14:42:28 +02:00
.RS
.IP \[ bu]
2020-09-07 12:46:28 +02:00
\fI id\fR : A string that represents the node id;
2020-08-31 14:42:28 +02:00
.IP \[ bu]
2020-09-07 12:46:28 +02:00
\fI len\fR : A integer that represents the length of the ping (default 128);
2020-08-31 14:42:28 +02:00
.IP \[ bu]
2020-09-07 12:46:28 +02:00
\fI pongbytes\fR : An integer that represents the length of the reply (default 128)\.
2020-08-31 14:42:28 +02:00
.RE
.SH EXAMPLE JSON REQUEST
.nf
.RS
{
"id": 82,
"method": "ping",
"params": {
"len": 128,
"pongbytes": 128
}
}
.RE
.fi
.SH RETURN VALUE
2021-06-16 03:10:17 +02:00
On success, an object is returned, containing:
2020-08-31 14:42:28 +02:00
.RS
.IP \[ bu]
2021-06-16 03:10:17 +02:00
\fB totlen\fR (u16): the answer length of the reply message (including header: 0 means no reply expected)
2020-08-31 14:42:28 +02:00
.RE
On failure, one of the following error codes may be returned:
.RS
.IP \[ bu]
2020-09-07 12:46:28 +02:00
-32602: Error in given parameters or unknown peer\.
2020-08-31 14:42:28 +02:00
.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
\fB lightning-connect\fR (7)
.SH RESOURCES
Main web site: \fI https://github.com/ElementsProject/lightning\fR
2021-06-16 03:10:17 +02:00
\" SHA256STAMP:78bf096eeb9c1d5f6734486cd9d925f3dc58ca8dfe0f54be0a5369242fbc3b7d