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.BufferManager == null)
            {
                throw new InvalidProgramException("The buffer manager in configuration cannot be null.");
            }
            if (_configuration.FrameBuilder == null)
            {
                throw new InvalidProgramException("The frame handler in configuration cannot be null.");
            }
        }
Exemple #2
0
 public TcpSocketClient(IPEndPoint remoteEP, TcpSocketClientConfiguration configuration = null)
     : this(remoteEP, null, configuration)
 {
 }
Exemple #3
0
 public TcpSocketClient(IPAddress remoteAddress, int remotePort, IPEndPoint localEP = null, TcpSocketClientConfiguration configuration = null)
     : this(new IPEndPoint(remoteAddress, remotePort), localEP, configuration)
 {
 }