Documentation ¶
Index ¶
Constants ¶
View Source
const ( ACTION_RECV_TOPIC_DATA = 11 ACTION_SEND_BUF = 5 ACTION_CONNECTED = 200 ACTION_DISCONNECTED = 201 ACTION_CONNECTFAIL = 202 ACTION_BEFORE_CONNECT = 203 ACTION_CLOSE = 204 ACTION_ERROR = 205 ACTION_CUSTOM = 220 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PubHub ¶
type PubHub struct {
// contains filtered or unexported fields
}
发布中心 负责创建管理会话对象 注册的方法必须是pub.开头
func (*PubHub) AddSession ¶
使用conntype参数, 调用pub.[xxx]注册的方法, 创建一个Pub会话对象
false: 如果sessionid已经存在; conntype参数未注册
type PubSessionIntf ¶
type PubSessionIntf interface { Start() Close() error // 发布数据 Pub(topic string, max int, args ...interface{}) int }
创建的Session对象必须要实现的接口方法
type SubHub ¶
type SubHub struct {
// contains filtered or unexported fields
}
订阅中心 负责创建管理会话对象 注册的方法必须是sub.开头
func (*SubHub) AddSession ¶
func (*SubHub) DelSession ¶
type SubSessionIntf ¶
Click to show internal directories.
Click to hide internal directories.