public void ReadCB(int nread) { OnReadEvent?.Invoke(this, _recvBuff, nread); /* * List<Packet> packets = new List<Packet>(); * _packetRead.process(_recvBuff, 0, nread, packets); * foreach (var p in packets) * { * //string s = System.Text.Encoding.Default.GetString(p.body); * //Console.WriteLine($"read packets:{s}"); * } */ }
private void RaiseOnRead(OnReadEventArgs args) { OnReadEvent?.Invoke(this, args); }