Exemplo n.º 1
0
        void lt_OnConnectionAccepted(object sender, SocketArg e)
        {
            GameClient client = CreateClient(e.Socket);

            client.OnAccountRequest += new EventHandler <AccountRequestArgs>(client_OnCredentialsRequest);
            client.OnChatMessage    += new EventHandler <ChatMessageArgs>(client_OnChatMessage);

            InputThread.AddConnection(client);
        }
Exemplo n.º 2
0
        public ServerBase(int listenPort, string dbConnectString)
        {
            // Start log thread
            LogThread log = new LogThread();

            // Start database thread
            if( dbConnectString != null )
                _db = new DatabaseThread(dbConnectString);

            // Start listen thread
            _lt = new ListenThread(listenPort);

            // Start input thread
            _inputThread = new InputThread();
        }
Exemplo n.º 3
0
        public ServerBase(int listenPort, string dbConnectString)
        {
            // Start log thread
            LogThread log = new LogThread();

            // Start database thread
            if (dbConnectString != null)
            {
                _db = new DatabaseThread(dbConnectString);
            }

            // Start listen thread
            _lt = new ListenThread(listenPort);

            // Start input thread
            _inputThread = new InputThread();
        }