Documentation ¶
Overview ¶
Generated by github.com/davyxu/protoplus DO NOT EDIT!
Index ¶
- Variables
- func Relay(sesDetector interface{}, dataList ...interface{}) error
- func ResoleveInboundEvent(inputEvent cellnet.Event) (ouputEvent cellnet.Event, handled bool, err error)
- func ResolveOutboundEvent(inputEvent cellnet.Event) (handled bool, err error)
- func SetBroadcaster(callback BroadcasterFunc)
- type BroadcasterFunc
- type PassthroughContent
- type RecvMsgEvent
- func (self *RecvMsgEvent) Message() interface{}
- func (self *RecvMsgEvent) PassThroughAsInt64() int64
- func (self *RecvMsgEvent) PassThroughAsInt64Slice() []int64
- func (self *RecvMsgEvent) PassThroughAsString() string
- func (self *RecvMsgEvent) Reply(msg interface{})
- func (self *RecvMsgEvent) Session() cellnet.Session
- type RelayACK
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInvalidPeerSession = errors.New("Require valid cellnet.Session or cellnet.TCPConnector")
)
Functions ¶
func Relay ¶
func Relay(sesDetector interface{}, dataList ...interface{}) error
payload: msg/bytes passthrough: int64, []int64, string
func ResoleveInboundEvent ¶
func ResoleveInboundEvent(inputEvent cellnet.Event) (ouputEvent cellnet.Event, handled bool, err error)
处理入站的relay消息
func ResolveOutboundEvent ¶
处理relay.Relay出站消息的日志
func SetBroadcaster ¶
func SetBroadcaster(callback BroadcasterFunc)
设置广播函数, 回调时,按对应Peer/Session所在的队列中调用
Types ¶
type BroadcasterFunc ¶
type BroadcasterFunc func(event *RecvMsgEvent)
type PassthroughContent ¶ added in v0.0.3
type RecvMsgEvent ¶
type RecvMsgEvent struct { Ses cellnet.Session Msg interface{} // contains filtered or unexported fields }
func (*RecvMsgEvent) Message ¶
func (self *RecvMsgEvent) Message() interface{}
func (*RecvMsgEvent) PassThroughAsInt64 ¶ added in v0.0.3
func (self *RecvMsgEvent) PassThroughAsInt64() int64
func (*RecvMsgEvent) PassThroughAsInt64Slice ¶ added in v0.0.3
func (self *RecvMsgEvent) PassThroughAsInt64Slice() []int64
func (*RecvMsgEvent) PassThroughAsString ¶ added in v0.0.3
func (self *RecvMsgEvent) PassThroughAsString() string
func (*RecvMsgEvent) Reply ¶ added in v0.0.3
func (self *RecvMsgEvent) Reply(msg interface{})
消息原路返回
func (*RecvMsgEvent) Session ¶
func (self *RecvMsgEvent) Session() cellnet.Session
Click to show internal directories.
Click to hide internal directories.