Documentation ¶
Index ¶
- Variables
- func Call(sesOrPeer interface{}, reqMsg interface{}, timeout time.Duration, ...)
- func CallSync(ud interface{}, reqMsg interface{}, timeout time.Duration) (interface{}, error)
- func ResolveInboundEvent(inputEvent cellnet.Event) (ouputEvent cellnet.Event, handled bool, err error)
- func ResolveOutboundEvent(inputEvent cellnet.Event) (handled bool, err error)
- type RPCSessionGetter
- type RecvMsgEvent
- type RemoteCallACK
- type RemoteCallMsg
- type RemoteCallREQ
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidPeerSession = errors.New("rpc: Invalid peer type, require cellnet.RPCSessionGetter or cellnet.Session") ErrEmptySession = errors.New("rpc: Empty session") )
View Source
var ErrTimeout = errors.New("RPC time out")
Functions ¶
func Call ¶
func Call(sesOrPeer interface{}, reqMsg interface{}, timeout time.Duration, userCallback func(raw interface{}))
ud: peer/session, reqMsg:请求用的消息, userCallback: 返回消息类型回调 func( ackMsg *ackMsgType)
func ResolveInboundEvent ¶
Types ¶
type RPCSessionGetter ¶
type RecvMsgEvent ¶
type RecvMsgEvent struct { Msg interface{} // contains filtered or unexported fields }
func (*RecvMsgEvent) Message ¶
func (self *RecvMsgEvent) Message() interface{}
func (*RecvMsgEvent) Queue ¶
func (self *RecvMsgEvent) Queue() cellnet.EventQueue
func (*RecvMsgEvent) Reply ¶
func (self *RecvMsgEvent) Reply(msg interface{})
func (*RecvMsgEvent) Session ¶
func (self *RecvMsgEvent) Session() cellnet.Session
type RemoteCallACK ¶
func (*RemoteCallACK) GetCallID ¶
func (self *RemoteCallACK) GetCallID() int64
func (*RemoteCallACK) GetMsgData ¶
func (self *RemoteCallACK) GetMsgData() []byte
func (*RemoteCallACK) GetMsgID ¶
func (self *RemoteCallACK) GetMsgID() uint16
func (*RemoteCallACK) String ¶
func (self *RemoteCallACK) String() string
type RemoteCallMsg ¶
type RemoteCallREQ ¶
func (*RemoteCallREQ) GetCallID ¶
func (self *RemoteCallREQ) GetCallID() int64
func (*RemoteCallREQ) GetMsgData ¶
func (self *RemoteCallREQ) GetMsgData() []byte
func (*RemoteCallREQ) GetMsgID ¶
func (self *RemoteCallREQ) GetMsgID() uint16
func (*RemoteCallREQ) String ¶
func (self *RemoteCallREQ) String() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.