예제 #1
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="serverEndPoint"></param>
 /// <param name="serverCert"></param>
 /// <param name="clientCert"></param>
 /// <param name="nombreServerCert"></param>
 public ScsTcpSslClient(ScsTcpEndPoint serverEndPoint, X509Certificate2 serverCert, X509Certificate2 clientCert, string nombreServerCert)
 {
     _serverEndPoint = serverEndPoint;
     _serverCert = serverCert;
     _clientCert = clientCert;
     _nombreServerCert = nombreServerCert;
 }
예제 #2
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)
 {
     this._clientSocket = clientSocket;
     this._clientSocket.NoDelay = true;
     IPEndPoint ipEndPoint = (IPEndPoint)this._clientSocket.RemoteEndPoint;
     this._remoteEndPoint = new ScsTcpEndPoint(ipEndPoint.Address.ToString(), ipEndPoint.Port);
     this._buffer = new byte[4096];
     this._syncLock = new object();
 }
        /// <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();
        }
예제 #4
0
        /// <summary>
        /// Creates a new TcpCommunicationChannel object.
        /// </summary>
        /// <param name="endpoint"></param>
        /// <param name="client"></param>
        /// <param name="stream"></param>
        public TcpSslCommunicationChannel(ScsTcpEndPoint endpoint, TcpClient client, SslStream stream)
        {
            _client = client;
            _client.NoDelay = true;

            _sslStream = stream;

            _remoteEndPoint = endpoint;

            _buffer = new byte[ReceiveBufferSize];
            _syncLock = new object();
        }
예제 #5
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;
 }
예제 #6
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;
 }
예제 #7
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;
 }
예제 #8
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="endPoint"></param>
 /// <param name="serverCert"></param>
 /// <param name="clientCert"></param>
 public TcpSslConnectionListener(ScsTcpEndPoint endPoint, X509Certificate2 serverCert, List<X509Certificate2> clientCerts)
 {
     _endPoint = endPoint;
     _serverCert = serverCert;
     _clientCerts = clientCerts;
 }