public void Send(byte[] bytes) { lock (_sendLocker) { _sendBuffer.WriteAllBytes(bytes); } }
public void Send(byte[] bytes) { lock (locker) { if (!IsConnected) { throw new Exception("From send : disconnected"); } sendBuffer.WriteAllBytes(bytes); Send(); } }