예제 #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();
        }
예제 #2
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();
        }
예제 #3
0
 public TcpSocketClient(IPEndPoint remoteEP, TcpSocketClientConfiguration configuration = null)
     : this(remoteEP, null, configuration)
 {
 }
예제 #4
0
 public TcpSocketClient(IPAddress remoteAddress, int remotePort, IPEndPoint localEP = null, TcpSocketClientConfiguration configuration = null)
     : this(new IPEndPoint(remoteAddress, remotePort), localEP, configuration)
 {
 }
예제 #5
0
 public TcpSocketClient(IPEndPoint remoteEP, TcpSocketClientConfiguration configuration = null)
     : this(remoteEP, null, configuration)
 {
 }
예제 #6
0
 public TcpSocketClient(IPAddress remoteAddress, int remotePort, IPEndPoint localEP = null, TcpSocketClientConfiguration configuration = null)
     : this(new IPEndPoint(remoteAddress, remotePort), localEP, configuration)
 {
 }