public void AcceptConnection()
 {
     Socket newClient = this.listener.AcceptSocket();
     ClientConnection client = new ClientConnection(newClient);
     client.StartHandling();
 }
Example #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)
     {
     }
 }
Example #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);
        }