- compile and run
$ make # compile
$ ./bin.gateway/gateway # start gateway (on tty 1)
$ ./bin.server/server # start server (on other tty2)
$ lua ./bin.client/client.lua # start client (on other tty3)
$ 1 {ping="xxx",ret=2,} # send request to server (on client tty3)
-
start gateway, wait message from client or server
-
start server, connect to gateway, gateway set server and save server fd
-
start client, connect to gateway and connect server, send others message to server
-
input cmd in client tty: 1 {ping="xxx",ret=2,} . will send protocal to server. cmd like : protId {} (prot must define)
-
if you want connect to gateway as debugclient, change client handshake md5 string for "debug_md5" in client.lua
-
3rd/cstring was copy from https://github.com/cloudwu/cstring
-
3rd/socket-server was copy from https://github.com/cloudwu/socket-server
-
copy from https://github.com/cloudwu/skynet
- 3rd/lua-md5
- lualib-src/lua-clientsocket.c
- bin.client/client.lua
- common-src/databuffer.h
- common-src/hashid.h