Documentation ¶
Index ¶
- Constants
- Variables
- func NewServer(client rpc.RPC, serverID string, seqID int32) rpc.Server
- type Call
- type RPCImpl
- type SessionImpl
- func (sess *SessionImpl) Bind(uid int) (bool, error)
- func (sess *SessionImpl) GateID() string
- func (sess *SessionImpl) ID() string
- func (sess *SessionImpl) Push(data []byte)
- func (sess *SessionImpl) PushAll(data []byte)
- func (sess *SessionImpl) PushGroup(data []byte, members []string)
- func (sess *SessionImpl) UID() int
Constants ¶
View Source
const CALL_TIMEOUT = 10 * time.Second
Variables ¶
View Source
var ErrNoKnow = errors.New("rpc: unknow")
View Source
var ErrTimeOut = errors.New("rpc: timeout")
Functions ¶
Types ¶
type Call ¶
type Call struct { Ch chan *rpcmsg.RPCMessage Err error // contains filtered or unexported fields }
type RPCImpl ¶
type RPCImpl struct {
// contains filtered or unexported fields
}
func (*RPCImpl) Call ¶
func (p *RPCImpl) Call(req *rpcmsg.RPCMessage) (resp *rpcmsg.RPCMessage, err error)
阻塞式
type SessionImpl ¶
type SessionImpl struct {
// contains filtered or unexported fields
}
func NewSession ¶
func NewSession(uid int, cid, gid string, rpc *RPCImpl) *SessionImpl
func (*SessionImpl) PushGroup ¶
func (sess *SessionImpl) PushGroup(data []byte, members []string)
PushAll 分组推送
Click to show internal directories.
Click to hide internal directories.