This commit is contained in:
esrrhs committed 2019-10-27 18:16:57 +08:00
1 parent 6ad90d18aa
commit 79a278a90f
5 files changed
+233 -139

No files matched your search

+128 -55
View File
@@ -48,17 +48,45 @@ func (MyMsg_TYPE) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_c06e4cca6c2cc899, []int{0, 0}
}
type FrameData_TYPE int32
const (
FrameData_USER_DATA FrameData_TYPE = 0
FrameData_CONN FrameData_TYPE = 1
FrameData_CONNRSP FrameData_TYPE = 2
FrameData_CLOSE FrameData_TYPE = 3
)
var FrameData_TYPE_name = map[int32]string{
0: "USER_DATA",
1: "CONN",
2: "CONNRSP",
3: "CLOSE",
}
var FrameData_TYPE_value = map[string]int32{
"USER_DATA": 0,
"CONN": 1,
"CONNRSP": 2,
"CLOSE": 3,
}
func (x FrameData_TYPE) String() string {
return proto.EnumName(FrameData_TYPE_name, int32(x))
}
func (FrameData_TYPE) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_c06e4cca6c2cc899, []int{1, 0}
}
type Frame_TYPE int32
const (
Frame_DATA Frame_TYPE = 0
Frame_REQ Frame_TYPE = 1
Frame_ACK Frame_TYPE = 2
Frame_PING Frame_TYPE = 3
Frame_PONG Frame_TYPE = 4
Frame_REG Frame_TYPE = 5
Frame_REGACK Frame_TYPE = 6
Frame_REGAGAIN Frame_TYPE = 7
Frame_DATA Frame_TYPE = 0
Frame_REQ Frame_TYPE = 1
Frame_ACK Frame_TYPE = 2
Frame_PING Frame_TYPE = 3
Frame_PONG Frame_TYPE = 4
)
var Frame_TYPE_name = map[int32]string{
@@ -67,20 +95,14 @@ var Frame_TYPE_name = map[int32]string{
2: "ACK",
3: "PING",
4: "PONG",
5: "REG",
6: "REGACK",
7: "REGAGAIN",
}
var Frame_TYPE_value = map[string]int32{
"DATA": 0,
"REQ": 1,
"ACK": 2,
"PING": 3,
"PONG": 4,
"REG": 5,
"REGACK": 6,
"REGAGAIN": 7,
"DATA": 0,
"REQ": 1,
"ACK": 2,
"PING": 3,
"PONG": 4,
}
func (x Frame_TYPE) String() string {
@@ -88,7 +110,7 @@ func (x Frame_TYPE) String() string {
}
func (Frame_TYPE) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_c06e4cca6c2cc899, []int{1, 0}
return fileDescriptor_c06e4cca6c2cc899, []int{2, 0}
}
type MyMsg struct {
@@ -218,23 +240,70 @@ func (m *MyMsg) GetTimeout() int32 {
return 0
}
type Frame struct {
type FrameData struct {
Type int32 `protobuf:"varint,1,opt,name=type,proto3" json:"type,omitempty"`
Resend bool `protobuf:"varint,2,opt,name=resend,proto3" json:"resend,omitempty"`
Sendtime int64 `protobuf:"varint,3,opt,name=sendtime,proto3" json:"sendtime,omitempty"`
Id int32 `protobuf:"varint,4,opt,name=id,proto3" json:"id,omitempty"`
Data []byte `protobuf:"bytes,5,opt,name=data,proto3" json:"data,omitempty"`
Dataid []int32 `protobuf:"varint,6,rep,packed,name=dataid,proto3" json:"dataid,omitempty"`
Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *FrameData) Reset() { *m = FrameData{} }
func (m *FrameData) String() string { return proto.CompactTextString(m) }
func (*FrameData) ProtoMessage() {}
func (*FrameData) Descriptor() ([]byte, []int) {
return fileDescriptor_c06e4cca6c2cc899, []int{1}
}
func (m *FrameData) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_FrameData.Unmarshal(m, b)
}
func (m *FrameData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_FrameData.Marshal(b, m, deterministic)
}
func (m *FrameData) XXX_Merge(src proto.Message) {
xxx_messageInfo_FrameData.Merge(m, src)
}
func (m *FrameData) XXX_Size() int {
return xxx_messageInfo_FrameData.Size(m)
}
func (m *FrameData) XXX_DiscardUnknown() {
xxx_messageInfo_FrameData.DiscardUnknown(m)
}
var xxx_messageInfo_FrameData proto.InternalMessageInfo
func (m *FrameData) GetType() int32 {
if m != nil {
return m.Type
}
return 0
}
func (m *FrameData) GetData() []byte {
if m != nil {
return m.Data
}
return nil
}
type Frame struct {
Type int32 `protobuf:"varint,1,opt,name=type,proto3" json:"type,omitempty"`
Resend bool `protobuf:"varint,2,opt,name=resend,proto3" json:"resend,omitempty"`
Sendtime int64 `protobuf:"varint,3,opt,name=sendtime,proto3" json:"sendtime,omitempty"`
Id int32 `protobuf:"varint,4,opt,name=id,proto3" json:"id,omitempty"`
Data *FrameData `protobuf:"bytes,5,opt,name=data,proto3" json:"data,omitempty"`
Dataid []int32 `protobuf:"varint,6,rep,packed,name=dataid,proto3" json:"dataid,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Frame) Reset() { *m = Frame{} }
func (m *Frame) String() string { return proto.CompactTextString(m) }
func (*Frame) ProtoMessage() {}
func (*Frame) Descriptor() ([]byte, []int) {
return fileDescriptor_c06e4cca6c2cc899, []int{1}
return fileDescriptor_c06e4cca6c2cc899, []int{2}
}
func (m *Frame) XXX_Unmarshal(b []byte) error {
@@ -283,7 +352,7 @@ func (m *Frame) GetId() int32 {
return 0
}
func (m *Frame) GetData() []byte {
func (m *Frame) GetData() *FrameData {
if m != nil {
return m.Data
}
@@ -299,39 +368,43 @@ func (m *Frame) GetDataid() []int32 {
func init() {
proto.RegisterEnum("MyMsg_TYPE", MyMsg_TYPE_name, MyMsg_TYPE_value)
proto.RegisterEnum("FrameData_TYPE", FrameData_TYPE_name, FrameData_TYPE_value)
proto.RegisterEnum("Frame_TYPE", Frame_TYPE_name, Frame_TYPE_value)
proto.RegisterType((*MyMsg)(nil), "MyMsg")
proto.RegisterType((*FrameData)(nil), "FrameData")
proto.RegisterType((*Frame)(nil), "Frame")
}
func init() { proto.RegisterFile("msg.proto", fileDescriptor_c06e4cca6c2cc899) }
var fileDescriptor_c06e4cca6c2cc899 = []byte{
// 407 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x92, 0xcd, 0x8e, 0xd3, 0x30,
0x14, 0x85, 0x71, 0x12, 0xa7, 0xe9, 0x9d, 0x32, 0xf2, 0x5c, 0x7e, 0x64, 0xb1, 0x8a, 0x2a, 0x21,
0xb2, 0x81, 0x05, 0x3c, 0x41, 0x66, 0x28, 0x51, 0x85, 0x5a, 0x06, 0xab, 0x9b, 0x61, 0x33, 0xca,
0x4c, 0x3c, 0x91, 0x05, 0x4e, 0xab, 0xc4, 0x15, 0x94, 0x77, 0xe2, 0x11, 0x78, 0x1d, 0x1e, 0x03,
0x21, 0xdf, 0xba, 0x95, 0x2a, 0x56, 0x3e, 0xe7, 0xde, 0x4f, 0xf5, 0xa9, 0x4f, 0x60, 0x6c, 0x87,
0xf6, 0xcd, 0xa6, 0x5f, 0xbb, 0xf5, 0xf4, 0x6f, 0x04, 0x7c, 0xb1, 0x5b, 0x0c, 0x2d, 0x9e, 0x43,
0x64, 0x1a, 0xc9, 0x72, 0x56, 0x8c, 0x55, 0x64, 0x1a, 0x44, 0x48, 0xdc, 0x6e, 0xa3, 0x65, 0x94,
0xb3, 0x82, 0x2b, 0xd2, 0xf8, 0x1c, 0x52, 0x57, 0xf7, 0xad, 0x76, 0x32, 0x26, 0x2e, 0x38, 0xcf,
0x36, 0xb5, 0xab, 0x65, 0x92, 0xb3, 0x62, 0xa2, 0x48, 0x7b, 0xb6, 0xa7, 0x3b, 0x24, 0xcf, 0x59,
0x71, 0xa1, 0x82, 0xc3, 0xa7, 0xc0, 0x6d, 0xdd, 0x9a, 0x7b, 0x99, 0xd2, 0x78, 0x6f, 0x50, 0x40,
0xfc, 0x55, 0xef, 0xe4, 0x88, 0x66, 0x5e, 0xa2, 0x84, 0x91, 0xbb, 0xdf, 0xd8, 0x75, 0xa3, 0x65,
0x46, 0x11, 0x0e, 0x16, 0x5f, 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 0xab, 0x3c, 0x98,
0xe2, 0x04, 0x32, 0xaf, 0xab, 0x72, 0xbe, 0x14, 0xa3, 0xcb, 0xc9, 0x17, 0xd8, 0x98, 0xae, 0x75,
0xdb, 0xae, 0xd3, 0xdf, 0xee, 0x52, 0xfa, 0x18, 0xde, 0xfd, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x4e,
0xfd, 0x1d, 0x91, 0x8b, 0x02, 0x00, 0x00,
// 448 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x52, 0xcb, 0x8e, 0xd3, 0x30,
0x14, 0xc5, 0x79, 0xb4, 0xcd, 0x6d, 0x67, 0xe4, 0x31, 0x0f, 0x59, 0x2c, 0x50, 0x14, 0x09, 0x91,
0x0d, 0xb3, 0x18, 0x24, 0x58, 0x77, 0x3a, 0xa5, 0x1a, 0x41, 0x1f, 0xb8, 0x65, 0x01, 0x9b, 0x2a,
0x33, 0xf1, 0x44, 0x16, 0xe3, 0xb4, 0x4a, 0x5c, 0x41, 0xf9, 0x27, 0x3e, 0x81, 0x6f, 0xe0, 0x8f,
0x10, 0xf2, 0xad, 0x93, 0x22, 0xc1, 0xca, 0xe7, 0xdc, 0x7b, 0xe4, 0x73, 0x7d, 0x7c, 0x21, 0xd2,
0x75, 0x71, 0xbe, 0xad, 0x36, 0x66, 0x93, 0xfc, 0xf6, 0x20, 0x9c, 0xee, 0xa7, 0x75, 0xc1, 0x4e,
0xc1, 0x53, 0x39, 0x27, 0x31, 0x49, 0x23, 0xe1, 0xa9, 0x9c, 0x31, 0x08, 0xcc, 0x7e, 0x2b, 0xb9,
0x17, 0x93, 0x34, 0x14, 0x88, 0xd9, 0x13, 0xe8, 0x98, 0xac, 0x2a, 0xa4, 0xe1, 0x3e, 0xea, 0x1c,
0xb3, 0xda, 0x3c, 0x33, 0x19, 0x0f, 0x62, 0x92, 0x0e, 0x04, 0x62, 0xab, 0xad, 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