public void Write(byte[] data) { if (!isConnected) { throw new InvalidOperationException("not_connected"); } sn.Write(this, data); }