public NetState(PacketRegistry packetRegistry) { Asserter.AssertIsNotNull(packetRegistry, "packetRegistry"); _packetRegistry = packetRegistry; _socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); _recvBuffer = new BufferPool("Receive Buffer", 16, 4096); _messagePump = new MessagePump(); _buffer = new ByteQueue(); }