예제 #1
0
        /// <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)
        {
            _clientSocket = clientSocket;
            _clientSocket.NoDelay = true;

            var ipEndPoint = (IPEndPoint)_clientSocket.RemoteEndPoint;
            _remoteEndPoint = new ScsTcpEndPoint(ipEndPoint.Address.ToString(), ipEndPoint.Port);

            _buffer = new byte[ReceiveBufferSize];
            _syncLock = new object();
        }
예제 #2
0
 /// <summary>
 /// Creates a new ScsTcpClient object.
 /// </summary>
 /// <param name="serverEndPoint">The endpoint address to connect to the server</param>
 public ScsTcpClient(ScsTcpEndPoint serverEndPoint)
 {
     _serverEndPoint = serverEndPoint;
 }
예제 #3
0
 /// <summary>
 /// Creates a new ScsTcpServer object.
 /// </summary>
 /// <param name="endPoint">The endpoint address of the server to listen incoming connections</param>
 public ScsTcpServer(ScsTcpEndPoint endPoint)
 {
     _endPoint = endPoint;
 }
예제 #4
0
 /// <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(ScsTcpEndPoint endPoint)
 {
     _endPoint = endPoint;
 }