static void Main(string[] args)
        {
            //Console.WriteLine("Hello World!");
            ServerStart openServer = new ServerStart(9000);

            openServer.center = new HandlerCenter();

            openServer.decode = LuaModelEncoding.decode;
            openServer.encode = LuaModelEncoding.encode;

            openServer.Start(23333);
            Console.WriteLine("服务器启动成功");
            while (Console.ReadLine() != "exit")
            {
            }
        }
Exemplo n.º 2
0
        //Server启动
        static void Main(string[] args)
        {
            ServerStart openServer = new ServerStart(9000);

            openServer.center = new HandlerCenter();

            //使用SocketModel协议传输信息
            //openServer.decode = SocketModelEncoding.decode;
            //openServer.encode = SocketModelEncoding.encode;

            //使用OpenModel协议传输信息
            //openServer.decode = OpenEncoding.decode;
            //openServer.encode = OpenEncoding.encode;

            //使用LuaModel
            openServer.decode = LuaModelEncoding.decode;
            openServer.encode = LuaModelEncoding.encode;

            openServer.Start(23333);
            Console.WriteLine("服务器启动成功");
            while (true)
            {
            }
        }