public TcpSocketSession( TcpClient tcpClient, TcpSocketServerConfiguration configuration, IBufferManager bufferManager, TcpSocketServer server) { if (tcpClient == null) throw new ArgumentNullException("tcpClient"); if (configuration == null) throw new ArgumentNullException("configuration"); if (bufferManager == null) throw new ArgumentNullException("bufferManager"); if (server == null) throw new ArgumentNullException("server"); _tcpClient = tcpClient; _configuration = configuration; _bufferManager = bufferManager; _server = server; _sessionKey = Guid.NewGuid().ToString(); this.StartTime = DateTime.UtcNow; ConfigureClient(); _remoteEndPoint = Active ? (IPEndPoint)_tcpClient.Client.RemoteEndPoint : null; _localEndPoint = Active ? (IPEndPoint)_tcpClient.Client.LocalEndPoint : null; }
public TcpSocketSession( TcpClient tcpClient, TcpSocketServerConfiguration configuration, IBufferManager bufferManager, TcpSocketServer server) { if (tcpClient == null) { throw new ArgumentNullException("tcpClient"); } if (configuration == null) { throw new ArgumentNullException("configuration"); } if (bufferManager == null) { throw new ArgumentNullException("bufferManager"); } if (server == null) { throw new ArgumentNullException("server"); } _tcpClient = tcpClient; _configuration = configuration; _bufferManager = bufferManager; _server = server; _sessionKey = Guid.NewGuid().ToString(); this.StartTime = DateTime.UtcNow; ConfigureClient(); _remoteEndPoint = Active ? (IPEndPoint)_tcpClient.Client.RemoteEndPoint : null; _localEndPoint = Active ? (IPEndPoint)_tcpClient.Client.LocalEndPoint : null; }
public TcpSocketSession( TcpClient tcpClient, TcpSocketServerConfiguration configuration, ISegmentBufferManager bufferManager, TcpSocketServer server) { if (tcpClient == null) { throw new ArgumentNullException("tcpClient"); } if (configuration == null) { throw new ArgumentNullException("configuration"); } if (bufferManager == null) { throw new ArgumentNullException("bufferManager"); } if (server == null) { throw new ArgumentNullException("server"); } _tcpClient = tcpClient; _configuration = configuration; _bufferManager = bufferManager; _server = server; this.StartTime = DateTime.UtcNow; SetSocketOptions(); _remoteEndPoint = this.RemoteEndPoint; _localEndPoint = this.LocalEndPoint; _sessionKey = configuration.SessionKeyBuilder.GetSessionKey(this.RemoteEndPoint.ToString()); }
public override void Send(string sessionKey, Cowboy.Sockets.TcpSocketServer _server) { SendFile(sessionKey, _server); }