Ejemplo n.º 1
0
 public TcpClient(ILogger <TcpClient <T> > logger, IOHandlerFactory <T> handlerFactory,
                  IReadOnlyList <EndPoint> endPoints) : base(logger, handlerFactory)
 {
     this.endPoints                   = endPoints;
     connectAsyncEventArgs            = new SocketAsyncEventArgs();
     connectAsyncEventArgs.Completed += ConnectCompleted;
 }
Ejemplo n.º 2
0
 public TcpServer(ILogger <TcpServer <T> > logger, IOHandlerFactory <T> handlerFactory, IPEndPoint serverEndPoint)
     : base(logger, handlerFactory)
 {
     this.serverEndPoint                   = serverEndPoint;
     serverSocketAsyncEventArgs            = new SocketAsyncEventArgs();
     serverSocketAsyncEventArgs.Completed += AcceptCompleted;
 }