public async Task PongAsync() { ThrowIfDisposed(); var cmdPayload = PongCmd.Generate(); await _connection.WithWriteLockAsync(async writer => { await writer.WriteAsync(cmdPayload).ConfigureAwait(false); await writer.FlushAsync().ConfigureAwait(false); }).ConfigureAwait(false); }
public void Pong() { ThrowIfDisposed(); var cmdPayload = PongCmd.Generate(); _connection.WithWriteLock(writer => { writer.Write(cmdPayload); writer.Flush(); }); }