public InboundListener(IPAddress ip,int port,delProcessConnection connectionProcessor)
 {
     _ip = ip;
     _port = port;
     _listener = new WrappedTcpListener(new TcpListener(ip, port));
     _listener.Start();
     _listener.BeginAcceptSocket(new AsyncCallback(RecieveClient), null);
     _connectionProcessor = connectionProcessor;
     if (_connectionProcessor == null)
         throw new Exception("Unable to construct inbound listener without providing a call back to process connections.");
 }
예제 #2
0
 public InboundListener(IPAddress ip, int port, delProcessConnection connectionProcessor)
 {
     _ip       = ip;
     _port     = port;
     _listener = new WrappedTcpListener(new TcpListener(ip, port));
     _listener.Start();
     _listener.BeginAcceptSocket(new AsyncCallback(RecieveClient), null);
     _connectionProcessor = connectionProcessor;
     if (_connectionProcessor == null)
     {
         throw new Exception("Unable to construct inbound listener without providing a call back to process connections.");
     }
 }