public void SendPing() { if (closed) { throw new WebSocketException("Session already closed"); } Write(OpCode.Ping); }