Exemple #1
0
        public TcpSocketClient(IPEndPoint remoteEP, IPEndPoint localEP, TcpSocketClientConfiguration configuration = null)
        {
            if (remoteEP == null)
                throw new ArgumentNullException("remoteEP");

            _remoteEndPoint = remoteEP;
            _localEndPoint = localEP;
            _configuration = configuration ?? new TcpSocketClientConfiguration();

            if (_configuration.FrameBuilder == null)
                throw new InvalidProgramException("The frame handler in configuration cannot be null.");

            Initialize();
        }
        public TcpSocketClient(IPEndPoint remoteEP, IPEndPoint localEP, TcpSocketClientConfiguration configuration = null)
        {
            if (remoteEP == null)
            {
                throw new ArgumentNullException("remoteEP");
            }

            _remoteEndPoint = remoteEP;
            _localEndPoint  = localEP;
            _configuration  = configuration ?? new TcpSocketClientConfiguration();

            if (_configuration.FrameBuilder == null)
            {
                throw new InvalidProgramException("The frame handler in configuration cannot be null.");
            }

            Initialize();
        }
 public TcpSocketClient(IPEndPoint remoteEP, TcpSocketClientConfiguration configuration = null)
     : this(remoteEP, null, configuration)
 {
 }
 public TcpSocketClient(IPAddress remoteAddress, int remotePort, IPEndPoint localEP = null, TcpSocketClientConfiguration configuration = null)
     : this(new IPEndPoint(remoteAddress, remotePort), localEP, configuration)
 {
 }
Exemple #5
0
 public TcpSocketClient(IPEndPoint remoteEP, TcpSocketClientConfiguration configuration = null)
     : this(remoteEP, null, configuration)
 {
 }
Exemple #6
0
 public TcpSocketClient(IPAddress remoteAddress, int remotePort, IPEndPoint localEP = null, TcpSocketClientConfiguration configuration = null)
     : this(new IPEndPoint(remoteAddress, remotePort), localEP, configuration)
 {
 }