手游这块~ 我想让 http 和 websocket 共存;
这样的方式会有什么问题吗?? 用redis做数据的存储当状态; 游戏的逻辑用http。。
战斗中采用websocket。。 不知道这样有产生什么问题
没试验过。。呵呵。希望大神们能给点建议
server {
listen 8080;
#lua_socket_buffer_size 8k;
#lua_socket_pool_size 30;
#游戏逻辑短连接
location /ddz {
default_type application/octet-stream;
content_by_lua_file lua/bin/ddz.lua ;
#lua_code_cache off;
}
#战斗过程长连接
location /ws {
content_by_lua_file lua/gateserver.lua ;
#lua_code_cache off;
}
发送时间: 2013-11-23 09:55
主题: Re: [openresty] 主动通知客户端~!!
完全可以!
> 在 2013年11月22日,20:53,wgm <wgm....@gmail.com> 写道:
>
> websocket 好像无法做到服务器推送指定信息到指定客户端,只能做广播。
>
--
--
邮件来自列表“openresty”,专用于技术讨论!
订阅: 请发空白邮件到 openresty+subscribe@googlegroups.com
发言: 请发邮件到 openresty@googlegroups.com
退订: 请发邮件至 openresty+unsubscribe@googlegroups.com
归档: http://groups.google.com/group/openresty
官网: http://openresty.org/
仓库: https://github.com/agentzh/ngx_openresty
教程: http://openresty.org/download/agentzh-nginx-tutorials-zhcn.html