Exemple #1
0
        private void listener_Connected(object sender, ConnectedEventArgs e)
        {
            TcpServer server = new TcpServer(e.Socket);

            server.Disconnected += new EventHandler(server_Disconnected);

            lock (servers)
            {
                servers.Add(server);
            }

            OnServerCreated(server);

            if (!server.IsConnected)
            {
                server.Disconnect();
            }
        }