public TcpConnection(ILog logger, Socket socket) { _logger = logger; socket.LingerState = new LingerOption(true, 0); _socket = socket; _localEndPoint = (IPEndPoint)_socket.LocalEndPoint; _remoteEndPoint = (IPEndPoint)_socket.RemoteEndPoint; }