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) { }