Documentation ¶
Overview ¶
****************************************************** WebSocket Client连接对象 Author :Jella Version :1.0.2(release) Dependency :github.com/gorilla/websocket ******************************************************
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //连接对象 Sessions sync.Map )
内部变量
Functions ¶
Types ¶
type Session ¶
type Session struct { RemoteAddress string //其他 Params interface{} // contains filtered or unexported fields }
*
- 连接对象结构体(应由服务来创建,外部不可手动创建)
type WSClient ¶
type WSClient struct { IsConnect bool // contains filtered or unexported fields }
* websocket客户端
func (*WSClient) Connect ¶
func (client *WSClient) Connect(conf WSClient_CONFIG) error
*
- 连接
- @param conf 连接配置
- @return 连接的错误。若没有错误则返回nil
type WSClient_CONFIG ¶
* 连接配置
Click to show internal directories.
Click to hide internal directories.