Skynet安装及配置

来源:互联网 发布:淘宝二手手机苹果 编辑:程序博客网 时间:2024/05/22 01:42

Skynet是云风写的轻量级游戏服务器。


首先Git源代码


按照提示 make linux 进行编译。


遇到一些问题:

1、缺少autoconf

sudo apt-get install autoconf

2、缺少readline

sudo apt-get install libreadline-dev

安装完后进入 skynet,重新 make linux即可成功。


参照提示:

./skynet examples/config# Launch first skynet node  (Gate server) and a skynet-master (see config for standalone option)./3rd/lua/lua examples/client.lua # Launch a client, and try to input hello.

成功!


Server:

[:01000001] LAUNCH logger [:01000002] LAUNCH snlua bootstrap[:01000003] LAUNCH snlua launcher[:01000004] LAUNCH snlua cmaster[:01000004] master listen socket 0.0.0.0:2013[:01000005] LAUNCH snlua cslave[:01000005] slave connect to master 127.0.0.1:2013[:01000004] connect from 127.0.0.1:53410 4[:01000006] LAUNCH harbor 1 16777221[:01000004] Harbor 1 (fd=4) report 127.0.0.1:2526[:01000005] Waiting for 0 harbors[:01000005] Shakehand ready[:01000007] LAUNCH snlua datacenterd[:01000008] LAUNCH snlua service_mgr[:01000009] LAUNCH snlua main[:01000009] Server start[:0100000a] LAUNCH snlua protoloader[:0100000b] LAUNCH snlua console[:0100000c] LAUNCH snlua debug_console 8000[:0100000c] Start debug console at 127.0.0.1:8000[:0100000d] LAUNCH snlua simpledb[:0100000e] LAUNCH snlua watchdog[:0100000f] LAUNCH snlua gate[:0100000f] Listen on 0.0.0.0:8888[:01000009] Watchdog listen on 8888[:01000009] KILL self[:01000002] KILL self[:0100000e] New client from : 127.0.0.1:60816[:01000010] LAUNCH snlua agentsethelloworld


Client:

Request:1Request:2RESPONSE1msgWelcome to skynet, I will send heartbeat every 5 sec.RESPONSE2REQUESTheartbeatREQUESTheartbeat

原创粉丝点击