1
This commit is contained in:
parent
6eeedf4061
commit
cb8a84e989
@ -209,8 +209,8 @@ func ParsePb(msgId uint16, data []byte) interface{} {
|
|||||||
type MsgHandler interface {`;
|
type MsgHandler interface {`;
|
||||||
this.ssProtoPb.nested.ss.nestedArray.forEach(
|
this.ssProtoPb.nested.ss.nestedArray.forEach(
|
||||||
(item) => {
|
(item) => {
|
||||||
if (item.name[0] == 'C' &&
|
if (item.name[0] == 'S' &&
|
||||||
item.name[1] == 'M') {
|
item.name[1] == 'S') {
|
||||||
data += `
|
data += `
|
||||||
${item.name}(*f5.MsgHdr, *${item.name})`;
|
${item.name}(*f5.MsgHdr, *${item.name})`;
|
||||||
}
|
}
|
||||||
@ -234,7 +234,7 @@ func (this *MsgHandlerImpl) ${item.name}(hdr *f5.MsgHdr, msg *${item.name}) {
|
|||||||
item.name[1] == 'S') {
|
item.name[1] == 'S') {
|
||||||
data += `
|
data += `
|
||||||
func (this *${item.name}) GetNetMsgId() uint16 {
|
func (this *${item.name}) GetNetMsgId() uint16 {
|
||||||
return uint16(CMMessageIdE__${item.name})
|
return uint16(SSMessageIdE__${item.name})
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
} else if (item.name[0] == 'S' &&
|
} else if (item.name[0] == 'S' &&
|
||||||
@ -255,7 +255,7 @@ func init() {
|
|||||||
item.name[1] == 'S') {
|
item.name[1] == 'S') {
|
||||||
data += `
|
data += `
|
||||||
handlers[int(SSMessageIdE__${item.name})] = &SsNetMsgHandler{
|
handlers[int(SSMessageIdE__${item.name})] = &SsNetMsgHandler{
|
||||||
MsgId: int(CMMessageIdE__${item.name}),
|
MsgId: int(SSMessageIdE__${item.name}),
|
||||||
ParseCb: func (data []byte) interface{} {
|
ParseCb: func (data []byte) interface{} {
|
||||||
msg := &${item.name}{}
|
msg := &${item.name}{}
|
||||||
proto.Unmarshal(data, msg)
|
proto.Unmarshal(data, msg)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user