public Packet Request(byte cmd, string address, byte[] data) { if (IsOpened) { lock (_DataLocker) { _PacketReceived.Reset(); _RecievedData.Clear(); _Response = null; } byte[] p = CreateRequest(cmd, address, data); _Commport.SendData(p); _PacketReceived.WaitOne(2000); return(_Response); } return(null); }
public void SendMessage(byte[] msg) { _Commport.SendData(msg); }