Documentation ¶
Index ¶
- func WriteMessage(client *meim.Client, msg proto.Message)
- type DataCreator
- func (m *DataCreator) Clone() *DataCreator
- func (m *DataCreator) CreateBody(cmd int) meim.ProtocolBody
- func (m *DataCreator) CreateHeader() meim.ProtocolHeader
- func (m *DataCreator) CreateMessage(body interface{}) *meim.Message
- func (m *DataCreator) GetCmd(body interface{}) (int, bool)
- func (m *DataCreator) GetCmd2(t reflect.Type) (int, bool)
- func (m *DataCreator) GetDescription(cmd int) string
- func (m *DataCreator) GetMsg(cmd int) interface{}
- func (m *DataCreator) SetBodyCmd(cmd int, body interface{}, desc ...string)
- func (m *DataCreator) SetBodyCmd2(cmd int, t reflect.Type, desc ...string)
- func (m *DataCreator) SetHeaderType(header meim.ProtocolHeader)
- func (m *DataCreator) SetHeaderType2(t reflect.Type)
- type ProtoData
- type ProtoDataCreator
- func (m *ProtoDataCreator) Clone() *ProtoDataCreator
- func (m *ProtoDataCreator) CreateBody(cmd int) meim.ProtocolBody
- func (m *ProtoDataCreator) CreateMessage(body interface{}) *meim.Message
- func (m *ProtoDataCreator) SetBodyCmd(cmd int, body proto.Message, desc ...string)
- func (m *ProtoDataCreator) SetBodyCmd2(cmd int, t reflect.Type, desc ...string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DataCreator ¶
type DataCreator struct {
// contains filtered or unexported fields
}
func NewDataCreator ¶
func NewDataCreator() *DataCreator
func (*DataCreator) Clone ¶
func (m *DataCreator) Clone() *DataCreator
func (*DataCreator) CreateBody ¶
func (m *DataCreator) CreateBody(cmd int) meim.ProtocolBody
func (*DataCreator) CreateHeader ¶
func (m *DataCreator) CreateHeader() meim.ProtocolHeader
func (*DataCreator) CreateMessage ¶
func (m *DataCreator) CreateMessage(body interface{}) *meim.Message
func (*DataCreator) GetCmd ¶
func (m *DataCreator) GetCmd(body interface{}) (int, bool)
func (*DataCreator) GetDescription ¶
func (m *DataCreator) GetDescription(cmd int) string
func (*DataCreator) GetMsg ¶
func (m *DataCreator) GetMsg(cmd int) interface{}
func (*DataCreator) SetBodyCmd ¶
func (m *DataCreator) SetBodyCmd(cmd int, body interface{}, desc ...string)
func (*DataCreator) SetBodyCmd2 ¶
func (m *DataCreator) SetBodyCmd2(cmd int, t reflect.Type, desc ...string)
func (*DataCreator) SetHeaderType ¶
func (m *DataCreator) SetHeaderType(header meim.ProtocolHeader)
func (*DataCreator) SetHeaderType2 ¶
func (m *DataCreator) SetHeaderType2(t reflect.Type)
type ProtoDataCreator ¶
type ProtoDataCreator struct {
*DataCreator
}
body 是proto.Message的创造器
func NewProtoDataCreator ¶
func NewProtoDataCreator() *ProtoDataCreator
func (*ProtoDataCreator) Clone ¶
func (m *ProtoDataCreator) Clone() *ProtoDataCreator
func (*ProtoDataCreator) CreateBody ¶
func (m *ProtoDataCreator) CreateBody(cmd int) meim.ProtocolBody
func (*ProtoDataCreator) CreateMessage ¶
func (m *ProtoDataCreator) CreateMessage(body interface{}) *meim.Message
func (*ProtoDataCreator) SetBodyCmd ¶
func (m *ProtoDataCreator) SetBodyCmd(cmd int, body proto.Message, desc ...string)
func (*ProtoDataCreator) SetBodyCmd2 ¶
func (m *ProtoDataCreator) SetBodyCmd2(cmd int, t reflect.Type, desc ...string)
必须是proto.Message类型的指针
Click to show internal directories.
Click to hide internal directories.