fooking
所属分类:Websocket编程
开发工具:C++
文件大小:0KB
下载次数:2
上传日期:2018-06-13 08:57:23
上 传 者:
sh-1993
说明: 分布式网关服务器(php游戏服务器、tcp服务器、websocket服务器)
(distributed gateway server(php game server, tcp server, websocket server))
文件列表:
Makefile (116, 2018-06-13)
bin/ (0, 2018-06-13)
config.lua (2071, 2018-06-13)
deps/ (0, 2018-06-13)
deps/lua/ (0, 2018-06-13)
deps/lua/Makefile (3273, 2018-06-13)
deps/lua/doc/ (0, 2018-06-13)
deps/lua/doc/contents.html (29850, 2018-06-13)
deps/lua/doc/logo.gif (4232, 2018-06-13)
deps/lua/doc/lua.1 (2138, 2018-06-13)
deps/lua/doc/lua.css (1614, 2018-06-13)
deps/lua/doc/luac.1 (3071, 2018-06-13)
deps/lua/doc/manual.css (414, 2018-06-13)
deps/lua/doc/manual.html (320870, 2018-06-13)
deps/lua/doc/osi-certified-72x60.png (3774, 2018-06-13)
deps/lua/src/ (0, 2018-06-13)
deps/lua/src/Makefile (6894, 2018-06-13)
deps/lua/src/lapi.c (30159, 2018-06-13)
deps/lua/src/lapi.h (535, 2018-06-13)
deps/lua/src/lauxlib.c (28389, 2018-06-13)
deps/lua/src/lauxlib.h (8433, 2018-06-13)
deps/lua/src/lbaselib.c (14507, 2018-06-13)
deps/lua/src/lbitlib.c (4946, 2018-06-13)
deps/lua/src/lcode.c (24737, 2018-06-13)
deps/lua/src/lcode.h (3189, 2018-06-13)
deps/lua/src/lcorolib.c (3752, 2018-06-13)
deps/lua/src/lctype.c (2318, 2018-06-13)
deps/lua/src/lctype.h (1837, 2018-06-13)
deps/lua/src/ldblib.c (12219, 2018-06-13)
deps/lua/src/ldebug.c (18157, 2018-06-13)
deps/lua/src/ldebug.h (1399, 2018-06-13)
deps/lua/src/ldo.c (22438, 2018-06-13)
deps/lua/src/ldo.h (1527, 2018-06-13)
... ...
fooking is distributed gateway server.It transfers client's requests to backend and send responses back with fpm protocol.
Just like Nginx, as building a http server with nginx and fastcgi server(e.g fpm, etc..), you can create a socket server with fooking.
# features
1 gateway server adding dynamicly.
2 unique sessionid for each client.
3 group broadcast(like redis's pub/sub).
4 server status monitor.
5 clients event notify(onconnect and onclose).
6 all language supported(php, python, etc...).
7 custom message protocol by lua.
8 backend connection keepalive.
# client protocol
client protocol is the protocol use in clients to fooking,
default build up with 4 bytes header in bigend and body, But you can custom protocol with lua(reference script.lua).
# backend protocol
backend protocol is the protocol use in fooking to backends, you can use any luanguage with support fastcgi.
this protocol is simply, reference: http://www.fastcgi.com/drupal/node/6?q=node/22
# getting started
this example is chat room, source code in example/chat
* Step 1(download and compile)
git clone https://github.com/scgywx/fooking.git
cd {$FOOKING_PATH}
make
* Step 2(start fooking router server)
cd src
./fooking ../router.lua
* Step 3(start fooking gateway server)
./fooking ../config.lua
* Step 4(start fastcgi server, e.g php-fpm)
service php-fpm start(if it was started please skip this step)
* Step 5(test)
modify websocket server host and port in example/chat/index.html(search 'ws://')
open index.html in your browser and starting chat
# arch
![image](http://static.oschina.net/uploads/space/2014/1209/222447_G7Ft_140911.jpg)
近期下载者:
相关文件:
收藏者: