Documentation ¶
Index ¶
Constants ¶
View Source
const ( CALL = iota REPLAY PUSH BROADCAST )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Header ¶
type Header interface { GetSeq() int32 SetSeq(seq int32) GetErr() string GetServiceMethod() string SetServiceMethod(sm string) SetErr(err string) }
Header --- start ---
func NewEmptyHeader ¶
func NewEmptyHeader() Header
type Message ¶
type Message interface { GetSeq() int32 Action() byte // 消息类型 SetAction(action byte) ServiceMethod() string Codec() byte // 针对Body SetCodec(c byte) MarshalBody() ([]byte, error) UnMarshalBody(b []byte) error SetHeader(h Header) Header() Header SetBody(b interface{}) }
Message --- start ---
func NewMessage ¶
func NewMessage() Message
Click to show internal directories.
Click to hide internal directories.