Documentation ¶
Index ¶
- type MsgHandler
- type MsgInfo
- type MsgRaw
- type Processor
- func (p *Processor) Marshal(msg interface{}) ([][]byte, error)
- func (p *Processor) Range(f func(id uint16, t reflect.Type))
- func (p *Processor) Register(msgId uint16, msg proto.Message) uint16
- func (p *Processor) Route(msg interface{}, userData interface{}) error
- func (p *Processor) SetByteOrder(littleEndian bool)
- func (p *Processor) SetHandler(msg proto.Message, msgHandler MsgHandler)
- func (p *Processor) SetRawHandler(id uint16, msgRawHandler MsgHandler)
- func (p *Processor) SetRouter(msg proto.Message, msgRouter *chanrpc.Server)
- func (p *Processor) Unmarshal(data []byte) (interface{}, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MsgHandler ¶
type MsgHandler func([]interface{})
type Processor ¶
type Processor struct {
// contains filtered or unexported fields
}
------------------------- | id | protobuf message | -------------------------
func NewProcessor ¶
func NewProcessor() *Processor
func (*Processor) Register ¶
It's dangerous to call the method on routing or marshaling (unmarshaling)
func (*Processor) SetByteOrder ¶
It's dangerous to call the method on routing or marshaling (unmarshaling)
func (*Processor) SetHandler ¶
func (p *Processor) SetHandler(msg proto.Message, msgHandler MsgHandler)
It's dangerous to call the method on routing or marshaling (unmarshaling)
func (*Processor) SetRawHandler ¶
func (p *Processor) SetRawHandler(id uint16, msgRawHandler MsgHandler)
It's dangerous to call the method on routing or marshaling (unmarshaling)
Click to show internal directories.
Click to hide internal directories.