Example #1
0
        public LoginServer(string name, int port)
        {
            //Begin ServerListener
            NetworkServer server = new NetworkServer(name)
            {
                ClientBufferSize = 0x400,
                OnConnect        = Auth_OnConnect,
                OnReceive        = Auth_OnReceive
            };

            server.Prepare(port, 100);
            server.BeginAccept();
        }
Example #2
0
        public GameServer(string name, int port)
        {
            //Begin ServerListener
            NetworkServer server = new NetworkServer(name)
            {
                ClientBufferSize = 0x1000,
                OnConnect        = OnConnect,
                OnReceive        = OnReceive,
                OnDisconnect     = OnDisconnect
            };

            server.Prepare(port, 100);
            server.BeginAccept();

            //Begin World Thread
            var t = new Threading.WorldThread();

            t.CreateThread();

            //Start monster thread
        }