public void AcceptConnection()
 {
     Socket newClient = this.listener.AcceptSocket();
     ClientConnection client = new ClientConnection(newClient);
     client.StartHandling();
 }
예제 #2
0
 void socketLintener_Connected(object sender, ConnectionEventArgs e)
 {
     try
     {
         var ssid = Guid.NewGuid();
         var clientConnection = new ClientConnection { SSID = ssid, Socket = e.Socket };
         TraceLog.ReleaseWriteDebug("连接 IP:{0},ssid:{1}", e.Socket.RemoteEndPoint, ssid);
         clientConnections.Add(ssid, e.Socket, clientConnection);
     }
     catch (Exception)
     {
     }
 }
예제 #3
0
        void socketLintener_Connected(object sender, ConnectionEventArgs e)
        {
            var ssid = Guid.NewGuid();
            var clientConnection = new ClientConnection { SSID = ssid, Socket = e.Socket };

            if (Logger.IsDebugEnabled)
            {
                Logger.Debug("连接 IP:{0},ssid:{1}", e.Socket.RemoteEndPoint, ssid);
            }
            clientConnections.Add(ssid, e.Socket, clientConnection);
        }