ping

suspend fun ping(): PingResult(source)

Send an SSH ping to the server and return the round-trip time.

Requires a prior successful connect and authentication. Returns PingResult.NotAuthenticated if there is no active connection or authentication has not completed, PingResult.NotSupported if the server did not advertise ping@openssh.com support via SSH2_MSG_EXT_INFO, or PingResult.Failure if the ping cannot be sent or the connection closes before the server replies.

Return

PingResult.Success with round-trip nanoseconds, PingResult.NotSupported, PingResult.NotAuthenticated, or PingResult.Failure