From db860e0406a2b01b89ed29f471e63220fcabbef9 Mon Sep 17 00:00:00 2001 From: ryanduan Date: Mon, 23 Mar 2020 17:08:07 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: ryanduan --- go.mod | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/go.mod b/go.mod index 531195d..129c079 100644 --- a/go.mod +++ b/go.mod @@ -1,10 +1,9 @@ module gitee.com/rczweb/wsPool -require github.com/gorilla/websocket v1.4.1 - require ( github.com/gogo/protobuf v1.3.1 github.com/golang/protobuf v1.3.5 + github.com/gorilla/websocket v1.4.1 ) go 1.13 -- Gitee From a8382d78e7ecaa6b3630316b70da3c91f1a597cb Mon Sep 17 00:00:00 2001 From: ryanduan Date: Mon, 23 Mar 2020 17:34:07 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: ryanduan --- README.md | 6 +++++- private.go | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f2eeec7..1863b9e 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,7 @@ func main() { 除 toClientId,fromClientId,channel外 其它都可以随意定议,增减都可以。 ```$xslt + message SendMsg { int32 cmd =1; int64 timestamp = 2; @@ -87,15 +88,18 @@ message SendMsg { bytes cmdData =5; //对应指令的CmdData1的protobuf的message string msgId=6; int32 status=7; //消息发送响应状态 - string Msg=8; //消息发送字符串内容 + string callbackMsg=8; //消息发送响应内容 string cmdkey=9; //用于区分同一cmd多条指令的key 方便api调用针对同一指令不同回调的处理 int32 priority=10; //用于处理指令队列的优先级的权重值 int32 localId = 11; //用于手机本地数据库存储标志, 服务端不用管 string pageKey = 12; //用于页面发送指令和接收的指令相对应 如发送cmd2003和收到的cmd1000对应 repeated string channel = 13; //指定需要广播的频道,可以指定一个或多个频道 string pageId = 14; //用于前端存储处理 + string msg =15; //一般用于json数据传递 + string Desc=16; } + ``` 作者很懒惰!! diff --git a/private.go b/private.go index fabac42..eb5cf26 100644 --- a/private.go +++ b/private.go @@ -47,11 +47,13 @@ func marshal(msg *SendMsg) ([]byte, error) { message.CmdData = msg.CmdData message.Status = msg.Status message.Msg = msg.Msg + message.CallbackMsg = msg.CallbackMsg message.Cmdkey = msg.Cmdkey message.Priority = msg.Priority message.PageKey = msg.PageKey message.Channel = msg.Channel message.PageId = msg.PageId + message.Desc = msg.Desc data, err := proto.Marshal(message) return data, err } @@ -77,6 +79,8 @@ func unMarshal(data []byte) (*SendMsg, error) { message.PageKey = msg.PageKey message.Channel = msg.Channel message.PageId = msg.PageId + message.Desc = msg.Desc + message.CallbackMsg = msg.CallbackMsg return message, err } -- Gitee From ab5d46611ee3dd9368b3678dc0c1dd5013b8f9bf Mon Sep 17 00:00:00 2001 From: ryanduan Date: Fri, 10 Apr 2020 13:07:21 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E4=BC=98=E5=8C=96pb=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 20 +++++-------- cmd.pb.go | 89 +++++++++++++++++-------------------------------------- cmd.proto | 22 ++++++++++++-- 3 files changed, 54 insertions(+), 77 deletions(-) diff --git a/README.md b/README.md index 1863b9e..1a050e4 100644 --- a/README.md +++ b/README.md @@ -82,21 +82,17 @@ func main() { message SendMsg { int32 cmd =1; - int64 timestamp = 2; + int64 timestamp = 2; //消息发送时间 string fromClientId =3; //指令消息的来源。发送者的连接ID string toClientId = 4; //指令消息的接收者。发送给对应的客户端连接ID bytes cmdData =5; //对应指令的CmdData1的protobuf的message - string msgId=6; - int32 status=7; //消息发送响应状态 - string callbackMsg=8; //消息发送响应内容 - string cmdkey=9; //用于区分同一cmd多条指令的key 方便api调用针对同一指令不同回调的处理 - int32 priority=10; //用于处理指令队列的优先级的权重值 - int32 localId = 11; //用于手机本地数据库存储标志, 服务端不用管 - string pageKey = 12; //用于页面发送指令和接收的指令相对应 如发送cmd2003和收到的cmd1000对应 - repeated string channel = 13; //指定需要广播的频道,可以指定一个或多个频道 - string pageId = 14; //用于前端存储处理 - string msg =15; //一般用于json数据传递 - string Desc=16; + int32 status=6; //消息发送响应状态 + int32 priority=7; //用于处理指令队列的优先级的权重值 + int32 localId = 8; //客户端标识消息的id,主要区分相同cmd的不同消息,方便收到回复分发处理等效果 + int64 serverId = 9; //服务端发送消息的ID,主要区分相同cmd的不同消息,方便服务端收到回复分发处理等效果 + repeated string channel = 10; //指定需要广播的频道,可以指定一个或多个频道 + string msg =11; //一般用于json数据传递,或消息发送响应内容 + string Desc=12; //消息介绍内容,或其它数据 } diff --git a/cmd.pb.go b/cmd.pb.go index f3e66e7..d4b74cc 100644 --- a/cmd.pb.go +++ b/cmd.pb.go @@ -26,17 +26,13 @@ type SendMsg struct { FromClientId string `protobuf:"bytes,3,opt,name=fromClientId,proto3" json:"fromClientId,omitempty"` ToClientId string `protobuf:"bytes,4,opt,name=toClientId,proto3" json:"toClientId,omitempty"` CmdData []byte `protobuf:"bytes,5,opt,name=cmdData,proto3" json:"cmdData,omitempty"` - MsgId string `protobuf:"bytes,6,opt,name=msgId,proto3" json:"msgId,omitempty"` - Status int32 `protobuf:"varint,7,opt,name=status,proto3" json:"status,omitempty"` - CallbackMsg string `protobuf:"bytes,8,opt,name=callbackMsg,proto3" json:"callbackMsg,omitempty"` - Cmdkey string `protobuf:"bytes,9,opt,name=cmdkey,proto3" json:"cmdkey,omitempty"` - Priority int32 `protobuf:"varint,10,opt,name=priority,proto3" json:"priority,omitempty"` - LocalId int32 `protobuf:"varint,11,opt,name=localId,proto3" json:"localId,omitempty"` - PageKey string `protobuf:"bytes,12,opt,name=pageKey,proto3" json:"pageKey,omitempty"` - Channel []string `protobuf:"bytes,13,rep,name=channel,proto3" json:"channel,omitempty"` - PageId string `protobuf:"bytes,14,opt,name=pageId,proto3" json:"pageId,omitempty"` - Msg string `protobuf:"bytes,15,opt,name=msg,proto3" json:"msg,omitempty"` - Desc string `protobuf:"bytes,16,opt,name=Desc,proto3" json:"Desc,omitempty"` + Status int32 `protobuf:"varint,6,opt,name=status,proto3" json:"status,omitempty"` + Priority int32 `protobuf:"varint,7,opt,name=priority,proto3" json:"priority,omitempty"` + LocalId int32 `protobuf:"varint,8,opt,name=localId,proto3" json:"localId,omitempty"` + ServerId int64 `protobuf:"varint,9,opt,name=serverId,proto3" json:"serverId,omitempty"` + Channel []string `protobuf:"bytes,10,rep,name=channel,proto3" json:"channel,omitempty"` + Msg string `protobuf:"bytes,11,opt,name=msg,proto3" json:"msg,omitempty"` + Desc string `protobuf:"bytes,12,opt,name=Desc,proto3" json:"Desc,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -102,13 +98,6 @@ func (m *SendMsg) GetCmdData() []byte { return nil } -func (m *SendMsg) GetMsgId() string { - if m != nil { - return m.MsgId - } - return "" -} - func (m *SendMsg) GetStatus() int32 { if m != nil { return m.Status @@ -116,20 +105,6 @@ func (m *SendMsg) GetStatus() int32 { return 0 } -func (m *SendMsg) GetCallbackMsg() string { - if m != nil { - return m.CallbackMsg - } - return "" -} - -func (m *SendMsg) GetCmdkey() string { - if m != nil { - return m.Cmdkey - } - return "" -} - func (m *SendMsg) GetPriority() int32 { if m != nil { return m.Priority @@ -144,11 +119,11 @@ func (m *SendMsg) GetLocalId() int32 { return 0 } -func (m *SendMsg) GetPageKey() string { +func (m *SendMsg) GetServerId() int64 { if m != nil { - return m.PageKey + return m.ServerId } - return "" + return 0 } func (m *SendMsg) GetChannel() []string { @@ -158,13 +133,6 @@ func (m *SendMsg) GetChannel() []string { return nil } -func (m *SendMsg) GetPageId() string { - if m != nil { - return m.PageId - } - return "" -} - func (m *SendMsg) GetMsg() string { if m != nil { return m.Msg @@ -188,24 +156,21 @@ func init() { } var fileDescriptor_7520252fb01eaf30 = []byte{ - // 294 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x91, 0xd1, 0x4a, 0xf3, 0x40, - 0x10, 0x85, 0xc9, 0x9f, 0x36, 0x6d, 0xa6, 0xfd, 0xb5, 0x0c, 0x22, 0x83, 0x88, 0x84, 0x5e, 0xe5, - 0xca, 0x1b, 0x1f, 0xc1, 0xde, 0x04, 0x29, 0x48, 0x7c, 0x82, 0xed, 0xee, 0x1a, 0x43, 0x77, 0xb3, - 0x21, 0xbb, 0x22, 0x7d, 0x22, 0x5f, 0x53, 0x76, 0xda, 0xd4, 0x7a, 0x37, 0xdf, 0x39, 0x73, 0x86, - 0x93, 0x2c, 0xe4, 0xd2, 0xaa, 0xc7, 0x7e, 0x70, 0xc1, 0x61, 0xf6, 0xe5, 0x5f, 0x9d, 0x33, 0xeb, - 0xef, 0x14, 0x66, 0x6f, 0xba, 0x53, 0x5b, 0xdf, 0xe0, 0x0a, 0x52, 0x69, 0x15, 0x25, 0x45, 0x52, - 0x4e, 0xeb, 0x38, 0xe2, 0x3d, 0xe4, 0xa1, 0xb5, 0xda, 0x07, 0x61, 0x7b, 0xfa, 0x57, 0x24, 0x65, - 0x5a, 0xff, 0x0a, 0xb8, 0x86, 0xe5, 0xfb, 0xe0, 0xec, 0xb3, 0x69, 0x75, 0x17, 0x2a, 0x45, 0x69, - 0x91, 0x94, 0x79, 0xfd, 0x47, 0xc3, 0x07, 0x80, 0xe0, 0xce, 0x1b, 0x13, 0xde, 0xb8, 0x50, 0x90, - 0x60, 0x26, 0xad, 0xda, 0x88, 0x20, 0x68, 0x5a, 0x24, 0xe5, 0xb2, 0x1e, 0x11, 0x6f, 0x60, 0x6a, - 0x7d, 0x53, 0x29, 0xca, 0x38, 0x74, 0x04, 0xbc, 0x85, 0xcc, 0x07, 0x11, 0x3e, 0x3d, 0xcd, 0xb8, - 0xe6, 0x89, 0xb0, 0x80, 0x85, 0x14, 0xc6, 0xec, 0x84, 0xdc, 0x6f, 0x7d, 0x43, 0x73, 0xce, 0x5c, - 0x4a, 0x31, 0x29, 0xad, 0xda, 0xeb, 0x03, 0xe5, 0x6c, 0x9e, 0x08, 0xef, 0x60, 0xde, 0x0f, 0xad, - 0x1b, 0xda, 0x70, 0x20, 0xe0, 0x9b, 0x67, 0x8e, 0xed, 0x8c, 0x93, 0xc2, 0x54, 0x8a, 0x16, 0x6c, - 0x8d, 0x18, 0x9d, 0x5e, 0x34, 0xfa, 0x45, 0x1f, 0x68, 0xc9, 0xe7, 0x46, 0xe4, 0x2f, 0xfa, 0x10, - 0x5d, 0xa7, 0x0d, 0xfd, 0x2f, 0xd2, 0xe8, 0x9c, 0x30, 0x36, 0x88, 0x4b, 0x95, 0xa2, 0xab, 0x63, - 0x83, 0x23, 0xc5, 0xff, 0x6e, 0x7d, 0x43, 0xd7, 0x2c, 0xc6, 0x11, 0x11, 0x26, 0x1b, 0xed, 0x25, - 0xad, 0x58, 0xe2, 0x79, 0x97, 0xf1, 0xc3, 0x3d, 0xfd, 0x04, 0x00, 0x00, 0xff, 0xff, 0x37, 0x5d, - 0xc7, 0xde, 0xc5, 0x01, 0x00, 0x00, + // 246 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x90, 0xc1, 0x4a, 0xc4, 0x30, + 0x10, 0x86, 0xe9, 0x76, 0xb7, 0xdd, 0x8e, 0x3d, 0xc8, 0x1c, 0x64, 0x10, 0x91, 0xb2, 0xa7, 0x9e, + 0xbc, 0xf8, 0x08, 0xee, 0xa5, 0x07, 0x41, 0xe2, 0x13, 0xc4, 0x24, 0xae, 0x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a, 0xa5, 0xe2, 0x4a, 0xef, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x5f, 0x8d, + 0xc4, 0x82, 0x5f, 0x01, 0x00, 0x00, } diff --git a/cmd.proto b/cmd.proto index 11f4273..0204c19 100644 --- a/cmd.proto +++ b/cmd.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package wsPool; -message SendMsg { +/*message SendMsg { int32 cmd =1; int64 timestamp = 2; string fromClientId =3; //指令消息的来源。发送者的连接ID @@ -12,10 +12,26 @@ message SendMsg { string callbackMsg=8; //消息发送响应内容 string cmdkey=9; //用于区分同一cmd多条指令的key 方便api调用针对同一指令不同回调的处理 int32 priority=10; //用于处理指令队列的优先级的权重值 - int32 localId = 11; //用于手机本地数据库存储标志, 服务端不用管 + int32 localId = 11; //客户端标识消息的id,主要区分相同cmd的不同消息,方便收到回复分发处理等效果 string pageKey = 12; //用于页面发送指令和接收的指令相对应 如发送cmd2003和收到的cmd1000对应 repeated string channel = 13; //指定需要广播的频道,可以指定一个或多个频道 string pageId = 14; //用于前端存储处理 string msg =15; //一般用于json数据传递 - string Desc=16; + string Desc=16; //消息介绍内容,或其它数据 +}*/ + + +message SendMsg { + int32 cmd =1; + int64 timestamp = 2; //消息发送时间 + string fromClientId =3; //指令消息的来源。发送者的连接ID + string toClientId = 4; //指令消息的接收者。发送给对应的客户端连接ID + bytes cmdData =5; //对应指令的CmdData1的protobuf的message + int32 status=6; //消息发送响应状态 + int32 priority=7; //用于处理指令队列的优先级的权重值 + int32 localId = 8; //客户端标识消息的id,主要区分相同cmd的不同消息,方便收到回复分发处理等效果 + int64 serverId = 9; //服务端发送消息的ID,主要区分相同cmd的不同消息,方便服务端收到回复分发处理等效果 + repeated string channel = 10; //指定需要广播的频道,可以指定一个或多个频道 + string msg =11; //一般用于json数据传递,或消息发送响应内容 + string Desc=12; //消息介绍内容,或其它数据 } -- Gitee From 488324568e68900dc456d6ab5e00b7ce0ed5edcd Mon Sep 17 00:00:00 2001 From: ryanduan Date: Fri, 10 Apr 2020 13:16:25 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E6=8F=90=E4=BA=A4v1.0=E5=88=86=E6=94=AF?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd.pb.go | 89 ++++++++++++++++++++++++++++++++++++++----------------- cmd.proto | 6 ++-- 2 files changed, 66 insertions(+), 29 deletions(-) diff --git a/cmd.pb.go b/cmd.pb.go index d4b74cc..f3e66e7 100644 --- a/cmd.pb.go +++ b/cmd.pb.go @@ -26,13 +26,17 @@ type SendMsg struct { FromClientId string `protobuf:"bytes,3,opt,name=fromClientId,proto3" json:"fromClientId,omitempty"` ToClientId string `protobuf:"bytes,4,opt,name=toClientId,proto3" json:"toClientId,omitempty"` CmdData []byte `protobuf:"bytes,5,opt,name=cmdData,proto3" json:"cmdData,omitempty"` - Status int32 `protobuf:"varint,6,opt,name=status,proto3" json:"status,omitempty"` - Priority int32 `protobuf:"varint,7,opt,name=priority,proto3" json:"priority,omitempty"` - LocalId int32 `protobuf:"varint,8,opt,name=localId,proto3" json:"localId,omitempty"` - ServerId int64 `protobuf:"varint,9,opt,name=serverId,proto3" json:"serverId,omitempty"` - Channel []string `protobuf:"bytes,10,rep,name=channel,proto3" json:"channel,omitempty"` - Msg string `protobuf:"bytes,11,opt,name=msg,proto3" json:"msg,omitempty"` - Desc string `protobuf:"bytes,12,opt,name=Desc,proto3" json:"Desc,omitempty"` + MsgId string `protobuf:"bytes,6,opt,name=msgId,proto3" json:"msgId,omitempty"` + Status int32 `protobuf:"varint,7,opt,name=status,proto3" json:"status,omitempty"` + CallbackMsg string `protobuf:"bytes,8,opt,name=callbackMsg,proto3" json:"callbackMsg,omitempty"` + Cmdkey string `protobuf:"bytes,9,opt,name=cmdkey,proto3" json:"cmdkey,omitempty"` + Priority int32 `protobuf:"varint,10,opt,name=priority,proto3" json:"priority,omitempty"` + LocalId int32 `protobuf:"varint,11,opt,name=localId,proto3" json:"localId,omitempty"` + PageKey string `protobuf:"bytes,12,opt,name=pageKey,proto3" json:"pageKey,omitempty"` + Channel []string `protobuf:"bytes,13,rep,name=channel,proto3" json:"channel,omitempty"` + PageId string `protobuf:"bytes,14,opt,name=pageId,proto3" json:"pageId,omitempty"` + Msg string `protobuf:"bytes,15,opt,name=msg,proto3" json:"msg,omitempty"` + Desc string `protobuf:"bytes,16,opt,name=Desc,proto3" json:"Desc,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -98,6 +102,13 @@ func (m *SendMsg) GetCmdData() []byte { return nil } +func (m *SendMsg) GetMsgId() string { + if m != nil { + return m.MsgId + } + return "" +} + func (m *SendMsg) GetStatus() int32 { if m != nil { return m.Status @@ -105,6 +116,20 @@ func (m *SendMsg) GetStatus() int32 { return 0 } +func (m *SendMsg) GetCallbackMsg() string { + if m != nil { + return m.CallbackMsg + } + return "" +} + +func (m *SendMsg) GetCmdkey() string { + if m != nil { + return m.Cmdkey + } + return "" +} + func (m *SendMsg) GetPriority() int32 { if m != nil { return m.Priority @@ -119,11 +144,11 @@ func (m *SendMsg) GetLocalId() int32 { return 0 } -func (m *SendMsg) GetServerId() int64 { +func (m *SendMsg) GetPageKey() string { if m != nil { - return m.ServerId + return m.PageKey } - return 0 + return "" } func (m *SendMsg) GetChannel() []string { @@ -133,6 +158,13 @@ func (m *SendMsg) GetChannel() []string { return nil } +func (m *SendMsg) GetPageId() string { + if m != nil { + return m.PageId + } + return "" +} + func (m *SendMsg) GetMsg() string { if m != nil { return m.Msg @@ -156,21 +188,24 @@ func init() { } var fileDescriptor_7520252fb01eaf30 = []byte{ - // 246 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x90, 0xc1, 0x4a, 0xc4, 0x30, - 0x10, 0x86, 0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, 0x69, 0x32, 0x96, 0xa0, 0x2b, 0xfb, - 0x46, 0x2c, 0x98, 0x1b, 0x71, 0xf1, 0x44, 0x17, 0x1c, 0x3b, 0x4b, 0x44, 0xd8, 0x1e, 0x4d, 0x54, - 0xd4, 0xb2, 0xc5, 0xfa, 0xa5, 0xe2, 0x4a, 0xef, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x5f, 0x8d, - 0xc4, 0x82, 0x5f, 0x01, 0x00, 0x00, + // 294 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x91, 0xd1, 0x4a, 0xf3, 0x40, + 0x10, 0x85, 0xc9, 0x9f, 0x36, 0x6d, 0xa6, 0xfd, 0xb5, 0x0c, 0x22, 0x83, 0x88, 0x84, 0x5e, 0xe5, + 0xca, 0x1b, 0x1f, 0xc1, 0xde, 0x04, 0x29, 0x48, 0x7c, 0x82, 0xed, 0xee, 0x1a, 0x43, 0x77, 0xb3, + 0x21, 0xbb, 0x22, 0x7d, 0x22, 0x5f, 0x53, 0x76, 0xda, 0xd4, 0x7a, 0x37, 0xdf, 0x39, 0x73, 0x86, + 0x93, 0x2c, 0xe4, 0xd2, 0xaa, 0xc7, 0x7e, 0x70, 0xc1, 0x61, 0xf6, 0xe5, 0x5f, 0x9d, 0x33, 0xeb, + 0xef, 0x14, 0x66, 0x6f, 0xba, 0x53, 0x5b, 0xdf, 0xe0, 0x0a, 0x52, 0x69, 0x15, 0x25, 0x45, 0x52, + 0x4e, 0xeb, 0x38, 0xe2, 0x3d, 0xe4, 0xa1, 0xb5, 0xda, 0x07, 0x61, 0x7b, 0xfa, 0x57, 0x24, 0x65, + 0x5a, 0xff, 0x0a, 0xb8, 0x86, 0xe5, 0xfb, 0xe0, 0xec, 0xb3, 0x69, 0x75, 0x17, 0x2a, 0x45, 0x69, + 0x91, 0x94, 0x79, 0xfd, 0x47, 0xc3, 0x07, 0x80, 0xe0, 0xce, 0x1b, 0x13, 0xde, 0xb8, 0x50, 0x90, + 0x60, 0x26, 0xad, 0xda, 0x88, 0x20, 0x68, 0x5a, 0x24, 0xe5, 0xb2, 0x1e, 0x11, 0x6f, 0x60, 0x6a, + 0x7d, 0x53, 0x29, 0xca, 0x38, 0x74, 0x04, 0xbc, 0x85, 0xcc, 0x07, 0x11, 0x3e, 0x3d, 0xcd, 0xb8, + 0xe6, 0x89, 0xb0, 0x80, 0x85, 0x14, 0xc6, 0xec, 0x84, 0xdc, 0x6f, 0x7d, 0x43, 0x73, 0xce, 0x5c, + 0x4a, 0x31, 0x29, 0xad, 0xda, 0xeb, 0x03, 0xe5, 0x6c, 0x9e, 0x08, 0xef, 0x60, 0xde, 0x0f, 0xad, + 0x1b, 0xda, 0x70, 0x20, 0xe0, 0x9b, 0x67, 0x8e, 0xed, 0x8c, 0x93, 0xc2, 0x54, 0x8a, 0x16, 0x6c, + 0x8d, 0x18, 0x9d, 0x5e, 0x34, 0xfa, 0x45, 0x1f, 0x68, 0xc9, 0xe7, 0x46, 0xe4, 0x2f, 0xfa, 0x10, + 0x5d, 0xa7, 0x0d, 0xfd, 0x2f, 0xd2, 0xe8, 0x9c, 0x30, 0x36, 0x88, 0x4b, 0x95, 0xa2, 0xab, 0x63, + 0x83, 0x23, 0xc5, 0xff, 0x6e, 0x7d, 0x43, 0xd7, 0x2c, 0xc6, 0x11, 0x11, 0x26, 0x1b, 0xed, 0x25, + 0xad, 0x58, 0xe2, 0x79, 0x97, 0xf1, 0xc3, 0x3d, 0xfd, 0x04, 0x00, 0x00, 0xff, 0xff, 0x37, 0x5d, + 0xc7, 0xde, 0xc5, 0x01, 0x00, 0x00, } diff --git a/cmd.proto b/cmd.proto index 0204c19..2100b76 100644 --- a/cmd.proto +++ b/cmd.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package wsPool; -/*message SendMsg { +message SendMsg { int32 cmd =1; int64 timestamp = 2; string fromClientId =3; //指令消息的来源。发送者的连接ID @@ -18,8 +18,9 @@ package wsPool; string pageId = 14; //用于前端存储处理 string msg =15; //一般用于json数据传递 string Desc=16; //消息介绍内容,或其它数据 -}*/ +} +/* message SendMsg { int32 cmd =1; @@ -35,3 +36,4 @@ message SendMsg { string msg =11; //一般用于json数据传递,或消息发送响应内容 string Desc=12; //消息介绍内容,或其它数据 } +*/ -- Gitee