Documentation
¶
Index ¶
- func Index(ctx dotweb.Context) error
- func Memstate(ctx dotweb.Context) error
- func OnPolling(ctx dotweb.Context) error
- func OnWebSocket(ctx dotweb.Context) error
- func SendMessage(ctx dotweb.Context) error
- func State(ctx dotweb.Context) error
- func StateData(ctx dotweb.Context) error
- func Test(ctx dotweb.Context) error
- func TestAuth(ctx dotweb.Context) error
- func TestMessage(ctx dotweb.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OnPolling ¶
longpoll统一处理入口 - 兼容Hijack与HttpRequest Author: panxinming CreateTime: 2017-01-25 13:00 入参: jsonpcallback: 应用定义jsonp-callback函数名,如果不传入默认为callback appid:应用编号,统一申请 groupid:用户组编号,应用自定义 userid:用户编号,应用需保证userid在同Appid下的唯一性 querykey:透传key,会透传给应用messageapi,一般用于决定是否有需要马上返回的数据 返回值: 0 成功 -100001:appid、groupid、querykey不能为空 -100002:指定appid不存在 -100003:注册失败 -100009:超时或其他异常,一般需重新发起请求 -200009:应用返回异常
//鉴权相关返回值 -101001:no permission connect! => appid[" + appId + "] no exists -101002:no permission connect! => check token has an error => [http-request-error] -101003:no permission connect! => check token has an error => [json-parse-error] -101004:no permission connect! => check token result => -101005:no permission connect! => check token: appid|groupid|userid not match
update log: 1、由于无法支持跨域,调整Hijack为HttpRequest --2017-02-04 by pxm 2、完善代码,Hijack模式支持跨域 --2017-02-05 by pxm 3、整合代码,兼容Hijack与HttpRequest --2017-02-07 by pxm 4、增加jsonp支持 --2017-02-08 17:00
func SendMessage ¶
推送消息 result: -1:not allow ip -2:message is empty -10001:message format error -10002:this appid no have permission
func TestMessage ¶
Types ¶
This section is empty.