/// <summary> /// Creates a new TcpCommunicationChannel object. /// </summary> /// <param name="clientSocket"> /// A connected Socket object that is /// used to communicate over network /// </param> public TcpCommunicationChannel(Socket clientSocket) { WireProtocol = WireProtocolManager.GetWireProtocol("Binary"); _clientSocket = clientSocket; // @TODO: Enable support for partial data and nagle algorithm in JsonWireProtocol _clientSocket.NoDelay = false; var ipEndPoint = (IPEndPoint)_clientSocket.RemoteEndPoint; _remoteEndPoint = new TcpEndPoint(ipEndPoint.Address.ToString(), ipEndPoint.Port); _buffer = new byte[ReceiveBufferSize]; _syncLock = new object(); }
public ZeusServerBase(string address) { // Minimal address content validation if (string.IsNullOrEmpty(address)) { throw new ArgumentNullException("address"); } // Create end-point and server _endPoint = new TcpEndPoint(address); _server = ServerFactory.CreateServer(_endPoint); // Attach client events _server.ClientConnected += ServerOnClientConnected; _server.ClientDisconnected += ServerOnClientDisconnected; }
public TcpClient(TcpEndPoint serverEndPoint) { _serverEndPoint = serverEndPoint; }
/// <summary> /// Creates a new TcpConnectionListener for given endpoint. /// </summary> /// <param name="endPoint">The endpoint address of the server to listen incoming connections</param> public TcpConnectionListener(TcpEndPoint endPoint) { _endPoint = endPoint; }
public TcpServer(TcpEndPoint endPoint) { _endPoint = endPoint; }