public ClientWrapper(Socket socket) { _socket = socket; _buffer = new byte[8192]; _parser = new MessagesParser(); _parser.MessageParsed += Parser_MessageParsed; Id = Interlocked.Increment(ref _counter); }
public void Dispose() { Running = false; _socket.Dispose(); _parser.Dispose(); Array.Clear(_buffer, 0, _buffer.Length); _socket = null; _parser = null; _buffer = null; }