Esempio n. 1
0
        /// <summary>
        /// Makes the server start listening on the socket.
        /// </summary>
        public void StartListeningForClients()
        {
            listener = new TcpListenerWrapper(Config.Network.ListenPort);
            listener.OnClientConnected += new TcpListenerWrapper.ClientConnectedDelegate(listener_OnClientConnected);

            listener.Listen(Config.Network.MaxConnectionsBacklog, Config.Network.MaxClientSendBacklog);
        }
Esempio n. 2
0
        public void StartListening()
        {
            listener = new TcpListenerWrapper(Config.ListenPort);
            listener.OnClientConnected += new TcpListenerWrapper.ClientConnectedDelegate(listener_OnClientConnected);

            clients = new ClientHandler();
            clients.UserPacketReceived += new ClientHandler.UserPacketReceivedDelegate(HandlePacket);
            clients.UserDisconnected += new ClientHandler.UserDisconnectedDelegate(clients_UserDisconnected);

            listener.Listen(Config.MaxConnectionsBacklog, Config.MaxClientSendBacklog);
        }