/// <summary> /// The ping command returns an acknowledgement, so that clients can test the connection status and latency. /// </summary> public async Task Ping(CancellationToken cancellationToken = default) { jsonBuffer.Clear(); jsonWriter.Reset(); jsonWriter.WriteStartObject(); var requestId = WriteHeader(jsonWriter, "ping"); WriteFooter(jsonWriter); jsonWriter.WriteEndObject(); jsonWriter.Flush(); var _ = await SendReceiveAsync(requestId, jsonBuffer.WrittenMemory, cancellationToken); }