You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1046 lines
24 KiB

  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: proto/p2p/conn_msgs.proto
  3. package p2p
  4. import (
  5. fmt "fmt"
  6. _ "github.com/gogo/protobuf/gogoproto"
  7. proto "github.com/gogo/protobuf/proto"
  8. io "io"
  9. math "math"
  10. math_bits "math/bits"
  11. )
  12. // Reference imports to suppress errors if they are not otherwise used.
  13. var _ = proto.Marshal
  14. var _ = fmt.Errorf
  15. var _ = math.Inf
  16. // This is a compile-time assertion to ensure that this generated file
  17. // is compatible with the proto package it is being compiled against.
  18. // A compilation error at this line likely means your copy of the
  19. // proto package needs to be updated.
  20. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
  21. type PacketPing struct {
  22. }
  23. func (m *PacketPing) Reset() { *m = PacketPing{} }
  24. func (m *PacketPing) String() string { return proto.CompactTextString(m) }
  25. func (*PacketPing) ProtoMessage() {}
  26. func (*PacketPing) Descriptor() ([]byte, []int) {
  27. return fileDescriptor_8c680f0b24d73fe7, []int{0}
  28. }
  29. func (m *PacketPing) XXX_Unmarshal(b []byte) error {
  30. return m.Unmarshal(b)
  31. }
  32. func (m *PacketPing) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  33. if deterministic {
  34. return xxx_messageInfo_PacketPing.Marshal(b, m, deterministic)
  35. } else {
  36. b = b[:cap(b)]
  37. n, err := m.MarshalToSizedBuffer(b)
  38. if err != nil {
  39. return nil, err
  40. }
  41. return b[:n], nil
  42. }
  43. }
  44. func (m *PacketPing) XXX_Merge(src proto.Message) {
  45. xxx_messageInfo_PacketPing.Merge(m, src)
  46. }
  47. func (m *PacketPing) XXX_Size() int {
  48. return m.Size()
  49. }
  50. func (m *PacketPing) XXX_DiscardUnknown() {
  51. xxx_messageInfo_PacketPing.DiscardUnknown(m)
  52. }
  53. var xxx_messageInfo_PacketPing proto.InternalMessageInfo
  54. type PacketPong struct {
  55. }
  56. func (m *PacketPong) Reset() { *m = PacketPong{} }
  57. func (m *PacketPong) String() string { return proto.CompactTextString(m) }
  58. func (*PacketPong) ProtoMessage() {}
  59. func (*PacketPong) Descriptor() ([]byte, []int) {
  60. return fileDescriptor_8c680f0b24d73fe7, []int{1}
  61. }
  62. func (m *PacketPong) XXX_Unmarshal(b []byte) error {
  63. return m.Unmarshal(b)
  64. }
  65. func (m *PacketPong) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  66. if deterministic {
  67. return xxx_messageInfo_PacketPong.Marshal(b, m, deterministic)
  68. } else {
  69. b = b[:cap(b)]
  70. n, err := m.MarshalToSizedBuffer(b)
  71. if err != nil {
  72. return nil, err
  73. }
  74. return b[:n], nil
  75. }
  76. }
  77. func (m *PacketPong) XXX_Merge(src proto.Message) {
  78. xxx_messageInfo_PacketPong.Merge(m, src)
  79. }
  80. func (m *PacketPong) XXX_Size() int {
  81. return m.Size()
  82. }
  83. func (m *PacketPong) XXX_DiscardUnknown() {
  84. xxx_messageInfo_PacketPong.DiscardUnknown(m)
  85. }
  86. var xxx_messageInfo_PacketPong proto.InternalMessageInfo
  87. type PacketMsg struct {
  88. ChannelID int32 `protobuf:"varint,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"`
  89. EOF int32 `protobuf:"varint,2,opt,name=eof,proto3" json:"eof,omitempty"`
  90. Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
  91. }
  92. func (m *PacketMsg) Reset() { *m = PacketMsg{} }
  93. func (m *PacketMsg) String() string { return proto.CompactTextString(m) }
  94. func (*PacketMsg) ProtoMessage() {}
  95. func (*PacketMsg) Descriptor() ([]byte, []int) {
  96. return fileDescriptor_8c680f0b24d73fe7, []int{2}
  97. }
  98. func (m *PacketMsg) XXX_Unmarshal(b []byte) error {
  99. return m.Unmarshal(b)
  100. }
  101. func (m *PacketMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  102. if deterministic {
  103. return xxx_messageInfo_PacketMsg.Marshal(b, m, deterministic)
  104. } else {
  105. b = b[:cap(b)]
  106. n, err := m.MarshalToSizedBuffer(b)
  107. if err != nil {
  108. return nil, err
  109. }
  110. return b[:n], nil
  111. }
  112. }
  113. func (m *PacketMsg) XXX_Merge(src proto.Message) {
  114. xxx_messageInfo_PacketMsg.Merge(m, src)
  115. }
  116. func (m *PacketMsg) XXX_Size() int {
  117. return m.Size()
  118. }
  119. func (m *PacketMsg) XXX_DiscardUnknown() {
  120. xxx_messageInfo_PacketMsg.DiscardUnknown(m)
  121. }
  122. var xxx_messageInfo_PacketMsg proto.InternalMessageInfo
  123. func (m *PacketMsg) GetChannelID() int32 {
  124. if m != nil {
  125. return m.ChannelID
  126. }
  127. return 0
  128. }
  129. func (m *PacketMsg) GetEOF() int32 {
  130. if m != nil {
  131. return m.EOF
  132. }
  133. return 0
  134. }
  135. func (m *PacketMsg) GetData() []byte {
  136. if m != nil {
  137. return m.Data
  138. }
  139. return nil
  140. }
  141. type Packet struct {
  142. // Types that are valid to be assigned to Sum:
  143. // *Packet_PacketPing
  144. // *Packet_PacketPong
  145. // *Packet_PacketMsg
  146. Sum isPacket_Sum `protobuf_oneof:"sum"`
  147. }
  148. func (m *Packet) Reset() { *m = Packet{} }
  149. func (m *Packet) String() string { return proto.CompactTextString(m) }
  150. func (*Packet) ProtoMessage() {}
  151. func (*Packet) Descriptor() ([]byte, []int) {
  152. return fileDescriptor_8c680f0b24d73fe7, []int{3}
  153. }
  154. func (m *Packet) XXX_Unmarshal(b []byte) error {
  155. return m.Unmarshal(b)
  156. }
  157. func (m *Packet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  158. if deterministic {
  159. return xxx_messageInfo_Packet.Marshal(b, m, deterministic)
  160. } else {
  161. b = b[:cap(b)]
  162. n, err := m.MarshalToSizedBuffer(b)
  163. if err != nil {
  164. return nil, err
  165. }
  166. return b[:n], nil
  167. }
  168. }
  169. func (m *Packet) XXX_Merge(src proto.Message) {
  170. xxx_messageInfo_Packet.Merge(m, src)
  171. }
  172. func (m *Packet) XXX_Size() int {
  173. return m.Size()
  174. }
  175. func (m *Packet) XXX_DiscardUnknown() {
  176. xxx_messageInfo_Packet.DiscardUnknown(m)
  177. }
  178. var xxx_messageInfo_Packet proto.InternalMessageInfo
  179. type isPacket_Sum interface {
  180. isPacket_Sum()
  181. MarshalTo([]byte) (int, error)
  182. Size() int
  183. }
  184. type Packet_PacketPing struct {
  185. PacketPing *PacketPing `protobuf:"bytes,1,opt,name=packet_ping,json=packetPing,proto3,oneof" json:"packet_ping,omitempty"`
  186. }
  187. type Packet_PacketPong struct {
  188. PacketPong *PacketPong `protobuf:"bytes,2,opt,name=packet_pong,json=packetPong,proto3,oneof" json:"packet_pong,omitempty"`
  189. }
  190. type Packet_PacketMsg struct {
  191. PacketMsg *PacketMsg `protobuf:"bytes,3,opt,name=packet_msg,json=packetMsg,proto3,oneof" json:"packet_msg,omitempty"`
  192. }
  193. func (*Packet_PacketPing) isPacket_Sum() {}
  194. func (*Packet_PacketPong) isPacket_Sum() {}
  195. func (*Packet_PacketMsg) isPacket_Sum() {}
  196. func (m *Packet) GetSum() isPacket_Sum {
  197. if m != nil {
  198. return m.Sum
  199. }
  200. return nil
  201. }
  202. func (m *Packet) GetPacketPing() *PacketPing {
  203. if x, ok := m.GetSum().(*Packet_PacketPing); ok {
  204. return x.PacketPing
  205. }
  206. return nil
  207. }
  208. func (m *Packet) GetPacketPong() *PacketPong {
  209. if x, ok := m.GetSum().(*Packet_PacketPong); ok {
  210. return x.PacketPong
  211. }
  212. return nil
  213. }
  214. func (m *Packet) GetPacketMsg() *PacketMsg {
  215. if x, ok := m.GetSum().(*Packet_PacketMsg); ok {
  216. return x.PacketMsg
  217. }
  218. return nil
  219. }
  220. // XXX_OneofWrappers is for the internal use of the proto package.
  221. func (*Packet) XXX_OneofWrappers() []interface{} {
  222. return []interface{}{
  223. (*Packet_PacketPing)(nil),
  224. (*Packet_PacketPong)(nil),
  225. (*Packet_PacketMsg)(nil),
  226. }
  227. }
  228. func init() {
  229. proto.RegisterType((*PacketPing)(nil), "tendermint.proto.p2p.PacketPing")
  230. proto.RegisterType((*PacketPong)(nil), "tendermint.proto.p2p.PacketPong")
  231. proto.RegisterType((*PacketMsg)(nil), "tendermint.proto.p2p.PacketMsg")
  232. proto.RegisterType((*Packet)(nil), "tendermint.proto.p2p.Packet")
  233. }
  234. func init() { proto.RegisterFile("proto/p2p/conn_msgs.proto", fileDescriptor_8c680f0b24d73fe7) }
  235. var fileDescriptor_8c680f0b24d73fe7 = []byte{
  236. // 324 bytes of a gzipped FileDescriptorProto
  237. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x91, 0x41, 0x4b, 0xfb, 0x30,
  238. 0x18, 0xc6, 0x9b, 0x7f, 0xff, 0x9b, 0xf4, 0xdd, 0xbc, 0x04, 0x0f, 0x9b, 0x87, 0x6c, 0xec, 0x20,
  239. 0x43, 0xa4, 0x85, 0xfa, 0x05, 0x64, 0x9b, 0xe2, 0x0e, 0xc3, 0xd1, 0xa3, 0x97, 0xd2, 0xb5, 0x35,
  240. 0x0d, 0xda, 0x24, 0xb4, 0xd9, 0xc1, 0x6f, 0xe1, 0xc7, 0xf2, 0xb8, 0xa3, 0x20, 0x0c, 0xe9, 0xbe,
  241. 0x88, 0x2c, 0x99, 0x5b, 0x05, 0xd1, 0xdb, 0xf3, 0x3c, 0xbc, 0xf9, 0xbd, 0x4f, 0x12, 0xe8, 0xca,
  242. 0x42, 0x28, 0xe1, 0x49, 0x5f, 0x7a, 0xb1, 0xe0, 0x3c, 0xcc, 0x4b, 0x5a, 0xba, 0x3a, 0xc3, 0x27,
  243. 0x2a, 0xe5, 0x49, 0x5a, 0xe4, 0x8c, 0x2b, 0x93, 0xb8, 0xd2, 0x97, 0xa7, 0x67, 0x2a, 0x63, 0x45,
  244. 0x12, 0xca, 0xa8, 0x50, 0xcf, 0x9e, 0x39, 0x4c, 0x05, 0x15, 0x07, 0x65, 0x66, 0x07, 0x6d, 0x80,
  245. 0x79, 0x14, 0x3f, 0xa6, 0x6a, 0xce, 0x38, 0xad, 0x39, 0xc1, 0xe9, 0x20, 0x03, 0xc7, 0xb8, 0x59,
  246. 0x49, 0xf1, 0x05, 0x40, 0x9c, 0x45, 0x9c, 0xa7, 0x4f, 0x21, 0x4b, 0x3a, 0xa8, 0x8f, 0x86, 0x8d,
  247. 0xd1, 0x71, 0xb5, 0xee, 0x39, 0x63, 0x93, 0x4e, 0x27, 0x81, 0xb3, 0x1b, 0x98, 0x26, 0xb8, 0x0b,
  248. 0x76, 0x2a, 0x1e, 0x3a, 0xff, 0xf4, 0xd8, 0x51, 0xb5, 0xee, 0xd9, 0xd7, 0x77, 0x37, 0xc1, 0x36,
  249. 0xc3, 0x18, 0xfe, 0x27, 0x91, 0x8a, 0x3a, 0x76, 0x1f, 0x0d, 0xdb, 0x81, 0xd6, 0x83, 0x77, 0x04,
  250. 0x4d, 0xb3, 0x0a, 0x8f, 0xa1, 0x25, 0xb5, 0x0a, 0x25, 0xe3, 0x54, 0x2f, 0x6a, 0xf9, 0x7d, 0xf7,
  251. 0xa7, 0x4b, 0xba, 0x87, 0xe6, 0xb7, 0x56, 0x00, 0x72, 0xef, 0xea, 0x10, 0xc1, 0xa9, 0xae, 0xf1,
  252. 0x17, 0x44, 0x7c, 0x83, 0x08, 0x4e, 0xf1, 0x15, 0xec, 0xdc, 0xf6, 0xb5, 0x75, 0xdd, 0x96, 0xdf,
  253. 0xfb, 0x8d, 0x31, 0x2b, 0xb7, 0x08, 0x47, 0x7e, 0x99, 0x51, 0x03, 0xec, 0x72, 0x99, 0x8f, 0x26,
  254. 0xaf, 0x15, 0x41, 0xab, 0x8a, 0xa0, 0x8f, 0x8a, 0xa0, 0x97, 0x0d, 0xb1, 0x56, 0x1b, 0x62, 0xbd,
  255. 0x6d, 0x88, 0x75, 0x7f, 0x4e, 0x99, 0xca, 0x96, 0x0b, 0x37, 0x16, 0xb9, 0x77, 0x00, 0xd7, 0xe5,
  256. 0xfe, 0xdf, 0x17, 0x4d, 0x2d, 0x2f, 0x3f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xad, 0x8c, 0xf9, 0x97,
  257. 0x0b, 0x02, 0x00, 0x00,
  258. }
  259. func (m *PacketPing) Marshal() (dAtA []byte, err error) {
  260. size := m.Size()
  261. dAtA = make([]byte, size)
  262. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  263. if err != nil {
  264. return nil, err
  265. }
  266. return dAtA[:n], nil
  267. }
  268. func (m *PacketPing) MarshalTo(dAtA []byte) (int, error) {
  269. size := m.Size()
  270. return m.MarshalToSizedBuffer(dAtA[:size])
  271. }
  272. func (m *PacketPing) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  273. i := len(dAtA)
  274. _ = i
  275. var l int
  276. _ = l
  277. return len(dAtA) - i, nil
  278. }
  279. func (m *PacketPong) Marshal() (dAtA []byte, err error) {
  280. size := m.Size()
  281. dAtA = make([]byte, size)
  282. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  283. if err != nil {
  284. return nil, err
  285. }
  286. return dAtA[:n], nil
  287. }
  288. func (m *PacketPong) MarshalTo(dAtA []byte) (int, error) {
  289. size := m.Size()
  290. return m.MarshalToSizedBuffer(dAtA[:size])
  291. }
  292. func (m *PacketPong) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  293. i := len(dAtA)
  294. _ = i
  295. var l int
  296. _ = l
  297. return len(dAtA) - i, nil
  298. }
  299. func (m *PacketMsg) Marshal() (dAtA []byte, err error) {
  300. size := m.Size()
  301. dAtA = make([]byte, size)
  302. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  303. if err != nil {
  304. return nil, err
  305. }
  306. return dAtA[:n], nil
  307. }
  308. func (m *PacketMsg) MarshalTo(dAtA []byte) (int, error) {
  309. size := m.Size()
  310. return m.MarshalToSizedBuffer(dAtA[:size])
  311. }
  312. func (m *PacketMsg) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  313. i := len(dAtA)
  314. _ = i
  315. var l int
  316. _ = l
  317. if len(m.Data) > 0 {
  318. i -= len(m.Data)
  319. copy(dAtA[i:], m.Data)
  320. i = encodeVarintConnMsgs(dAtA, i, uint64(len(m.Data)))
  321. i--
  322. dAtA[i] = 0x1a
  323. }
  324. if m.EOF != 0 {
  325. i = encodeVarintConnMsgs(dAtA, i, uint64(m.EOF))
  326. i--
  327. dAtA[i] = 0x10
  328. }
  329. if m.ChannelID != 0 {
  330. i = encodeVarintConnMsgs(dAtA, i, uint64(m.ChannelID))
  331. i--
  332. dAtA[i] = 0x8
  333. }
  334. return len(dAtA) - i, nil
  335. }
  336. func (m *Packet) Marshal() (dAtA []byte, err error) {
  337. size := m.Size()
  338. dAtA = make([]byte, size)
  339. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  340. if err != nil {
  341. return nil, err
  342. }
  343. return dAtA[:n], nil
  344. }
  345. func (m *Packet) MarshalTo(dAtA []byte) (int, error) {
  346. size := m.Size()
  347. return m.MarshalToSizedBuffer(dAtA[:size])
  348. }
  349. func (m *Packet) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  350. i := len(dAtA)
  351. _ = i
  352. var l int
  353. _ = l
  354. if m.Sum != nil {
  355. {
  356. size := m.Sum.Size()
  357. i -= size
  358. if _, err := m.Sum.MarshalTo(dAtA[i:]); err != nil {
  359. return 0, err
  360. }
  361. }
  362. }
  363. return len(dAtA) - i, nil
  364. }
  365. func (m *Packet_PacketPing) MarshalTo(dAtA []byte) (int, error) {
  366. size := m.Size()
  367. return m.MarshalToSizedBuffer(dAtA[:size])
  368. }
  369. func (m *Packet_PacketPing) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  370. i := len(dAtA)
  371. if m.PacketPing != nil {
  372. {
  373. size, err := m.PacketPing.MarshalToSizedBuffer(dAtA[:i])
  374. if err != nil {
  375. return 0, err
  376. }
  377. i -= size
  378. i = encodeVarintConnMsgs(dAtA, i, uint64(size))
  379. }
  380. i--
  381. dAtA[i] = 0xa
  382. }
  383. return len(dAtA) - i, nil
  384. }
  385. func (m *Packet_PacketPong) MarshalTo(dAtA []byte) (int, error) {
  386. size := m.Size()
  387. return m.MarshalToSizedBuffer(dAtA[:size])
  388. }
  389. func (m *Packet_PacketPong) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  390. i := len(dAtA)
  391. if m.PacketPong != nil {
  392. {
  393. size, err := m.PacketPong.MarshalToSizedBuffer(dAtA[:i])
  394. if err != nil {
  395. return 0, err
  396. }
  397. i -= size
  398. i = encodeVarintConnMsgs(dAtA, i, uint64(size))
  399. }
  400. i--
  401. dAtA[i] = 0x12
  402. }
  403. return len(dAtA) - i, nil
  404. }
  405. func (m *Packet_PacketMsg) MarshalTo(dAtA []byte) (int, error) {
  406. size := m.Size()
  407. return m.MarshalToSizedBuffer(dAtA[:size])
  408. }
  409. func (m *Packet_PacketMsg) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  410. i := len(dAtA)
  411. if m.PacketMsg != nil {
  412. {
  413. size, err := m.PacketMsg.MarshalToSizedBuffer(dAtA[:i])
  414. if err != nil {
  415. return 0, err
  416. }
  417. i -= size
  418. i = encodeVarintConnMsgs(dAtA, i, uint64(size))
  419. }
  420. i--
  421. dAtA[i] = 0x1a
  422. }
  423. return len(dAtA) - i, nil
  424. }
  425. func encodeVarintConnMsgs(dAtA []byte, offset int, v uint64) int {
  426. offset -= sovConnMsgs(v)
  427. base := offset
  428. for v >= 1<<7 {
  429. dAtA[offset] = uint8(v&0x7f | 0x80)
  430. v >>= 7
  431. offset++
  432. }
  433. dAtA[offset] = uint8(v)
  434. return base
  435. }
  436. func (m *PacketPing) Size() (n int) {
  437. if m == nil {
  438. return 0
  439. }
  440. var l int
  441. _ = l
  442. return n
  443. }
  444. func (m *PacketPong) Size() (n int) {
  445. if m == nil {
  446. return 0
  447. }
  448. var l int
  449. _ = l
  450. return n
  451. }
  452. func (m *PacketMsg) Size() (n int) {
  453. if m == nil {
  454. return 0
  455. }
  456. var l int
  457. _ = l
  458. if m.ChannelID != 0 {
  459. n += 1 + sovConnMsgs(uint64(m.ChannelID))
  460. }
  461. if m.EOF != 0 {
  462. n += 1 + sovConnMsgs(uint64(m.EOF))
  463. }
  464. l = len(m.Data)
  465. if l > 0 {
  466. n += 1 + l + sovConnMsgs(uint64(l))
  467. }
  468. return n
  469. }
  470. func (m *Packet) Size() (n int) {
  471. if m == nil {
  472. return 0
  473. }
  474. var l int
  475. _ = l
  476. if m.Sum != nil {
  477. n += m.Sum.Size()
  478. }
  479. return n
  480. }
  481. func (m *Packet_PacketPing) Size() (n int) {
  482. if m == nil {
  483. return 0
  484. }
  485. var l int
  486. _ = l
  487. if m.PacketPing != nil {
  488. l = m.PacketPing.Size()
  489. n += 1 + l + sovConnMsgs(uint64(l))
  490. }
  491. return n
  492. }
  493. func (m *Packet_PacketPong) Size() (n int) {
  494. if m == nil {
  495. return 0
  496. }
  497. var l int
  498. _ = l
  499. if m.PacketPong != nil {
  500. l = m.PacketPong.Size()
  501. n += 1 + l + sovConnMsgs(uint64(l))
  502. }
  503. return n
  504. }
  505. func (m *Packet_PacketMsg) Size() (n int) {
  506. if m == nil {
  507. return 0
  508. }
  509. var l int
  510. _ = l
  511. if m.PacketMsg != nil {
  512. l = m.PacketMsg.Size()
  513. n += 1 + l + sovConnMsgs(uint64(l))
  514. }
  515. return n
  516. }
  517. func sovConnMsgs(x uint64) (n int) {
  518. return (math_bits.Len64(x|1) + 6) / 7
  519. }
  520. func sozConnMsgs(x uint64) (n int) {
  521. return sovConnMsgs(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  522. }
  523. func (m *PacketPing) Unmarshal(dAtA []byte) error {
  524. l := len(dAtA)
  525. iNdEx := 0
  526. for iNdEx < l {
  527. preIndex := iNdEx
  528. var wire uint64
  529. for shift := uint(0); ; shift += 7 {
  530. if shift >= 64 {
  531. return ErrIntOverflowConnMsgs
  532. }
  533. if iNdEx >= l {
  534. return io.ErrUnexpectedEOF
  535. }
  536. b := dAtA[iNdEx]
  537. iNdEx++
  538. wire |= uint64(b&0x7F) << shift
  539. if b < 0x80 {
  540. break
  541. }
  542. }
  543. fieldNum := int32(wire >> 3)
  544. wireType := int(wire & 0x7)
  545. if wireType == 4 {
  546. return fmt.Errorf("proto: PacketPing: wiretype end group for non-group")
  547. }
  548. if fieldNum <= 0 {
  549. return fmt.Errorf("proto: PacketPing: illegal tag %d (wire type %d)", fieldNum, wire)
  550. }
  551. switch fieldNum {
  552. default:
  553. iNdEx = preIndex
  554. skippy, err := skipConnMsgs(dAtA[iNdEx:])
  555. if err != nil {
  556. return err
  557. }
  558. if skippy < 0 {
  559. return ErrInvalidLengthConnMsgs
  560. }
  561. if (iNdEx + skippy) < 0 {
  562. return ErrInvalidLengthConnMsgs
  563. }
  564. if (iNdEx + skippy) > l {
  565. return io.ErrUnexpectedEOF
  566. }
  567. iNdEx += skippy
  568. }
  569. }
  570. if iNdEx > l {
  571. return io.ErrUnexpectedEOF
  572. }
  573. return nil
  574. }
  575. func (m *PacketPong) Unmarshal(dAtA []byte) error {
  576. l := len(dAtA)
  577. iNdEx := 0
  578. for iNdEx < l {
  579. preIndex := iNdEx
  580. var wire uint64
  581. for shift := uint(0); ; shift += 7 {
  582. if shift >= 64 {
  583. return ErrIntOverflowConnMsgs
  584. }
  585. if iNdEx >= l {
  586. return io.ErrUnexpectedEOF
  587. }
  588. b := dAtA[iNdEx]
  589. iNdEx++
  590. wire |= uint64(b&0x7F) << shift
  591. if b < 0x80 {
  592. break
  593. }
  594. }
  595. fieldNum := int32(wire >> 3)
  596. wireType := int(wire & 0x7)
  597. if wireType == 4 {
  598. return fmt.Errorf("proto: PacketPong: wiretype end group for non-group")
  599. }
  600. if fieldNum <= 0 {
  601. return fmt.Errorf("proto: PacketPong: illegal tag %d (wire type %d)", fieldNum, wire)
  602. }
  603. switch fieldNum {
  604. default:
  605. iNdEx = preIndex
  606. skippy, err := skipConnMsgs(dAtA[iNdEx:])
  607. if err != nil {
  608. return err
  609. }
  610. if skippy < 0 {
  611. return ErrInvalidLengthConnMsgs
  612. }
  613. if (iNdEx + skippy) < 0 {
  614. return ErrInvalidLengthConnMsgs
  615. }
  616. if (iNdEx + skippy) > l {
  617. return io.ErrUnexpectedEOF
  618. }
  619. iNdEx += skippy
  620. }
  621. }
  622. if iNdEx > l {
  623. return io.ErrUnexpectedEOF
  624. }
  625. return nil
  626. }
  627. func (m *PacketMsg) Unmarshal(dAtA []byte) error {
  628. l := len(dAtA)
  629. iNdEx := 0
  630. for iNdEx < l {
  631. preIndex := iNdEx
  632. var wire uint64
  633. for shift := uint(0); ; shift += 7 {
  634. if shift >= 64 {
  635. return ErrIntOverflowConnMsgs
  636. }
  637. if iNdEx >= l {
  638. return io.ErrUnexpectedEOF
  639. }
  640. b := dAtA[iNdEx]
  641. iNdEx++
  642. wire |= uint64(b&0x7F) << shift
  643. if b < 0x80 {
  644. break
  645. }
  646. }
  647. fieldNum := int32(wire >> 3)
  648. wireType := int(wire & 0x7)
  649. if wireType == 4 {
  650. return fmt.Errorf("proto: PacketMsg: wiretype end group for non-group")
  651. }
  652. if fieldNum <= 0 {
  653. return fmt.Errorf("proto: PacketMsg: illegal tag %d (wire type %d)", fieldNum, wire)
  654. }
  655. switch fieldNum {
  656. case 1:
  657. if wireType != 0 {
  658. return fmt.Errorf("proto: wrong wireType = %d for field ChannelID", wireType)
  659. }
  660. m.ChannelID = 0
  661. for shift := uint(0); ; shift += 7 {
  662. if shift >= 64 {
  663. return ErrIntOverflowConnMsgs
  664. }
  665. if iNdEx >= l {
  666. return io.ErrUnexpectedEOF
  667. }
  668. b := dAtA[iNdEx]
  669. iNdEx++
  670. m.ChannelID |= int32(b&0x7F) << shift
  671. if b < 0x80 {
  672. break
  673. }
  674. }
  675. case 2:
  676. if wireType != 0 {
  677. return fmt.Errorf("proto: wrong wireType = %d for field EOF", wireType)
  678. }
  679. m.EOF = 0
  680. for shift := uint(0); ; shift += 7 {
  681. if shift >= 64 {
  682. return ErrIntOverflowConnMsgs
  683. }
  684. if iNdEx >= l {
  685. return io.ErrUnexpectedEOF
  686. }
  687. b := dAtA[iNdEx]
  688. iNdEx++
  689. m.EOF |= int32(b&0x7F) << shift
  690. if b < 0x80 {
  691. break
  692. }
  693. }
  694. case 3:
  695. if wireType != 2 {
  696. return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
  697. }
  698. var byteLen int
  699. for shift := uint(0); ; shift += 7 {
  700. if shift >= 64 {
  701. return ErrIntOverflowConnMsgs
  702. }
  703. if iNdEx >= l {
  704. return io.ErrUnexpectedEOF
  705. }
  706. b := dAtA[iNdEx]
  707. iNdEx++
  708. byteLen |= int(b&0x7F) << shift
  709. if b < 0x80 {
  710. break
  711. }
  712. }
  713. if byteLen < 0 {
  714. return ErrInvalidLengthConnMsgs
  715. }
  716. postIndex := iNdEx + byteLen
  717. if postIndex < 0 {
  718. return ErrInvalidLengthConnMsgs
  719. }
  720. if postIndex > l {
  721. return io.ErrUnexpectedEOF
  722. }
  723. m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
  724. if m.Data == nil {
  725. m.Data = []byte{}
  726. }
  727. iNdEx = postIndex
  728. default:
  729. iNdEx = preIndex
  730. skippy, err := skipConnMsgs(dAtA[iNdEx:])
  731. if err != nil {
  732. return err
  733. }
  734. if skippy < 0 {
  735. return ErrInvalidLengthConnMsgs
  736. }
  737. if (iNdEx + skippy) < 0 {
  738. return ErrInvalidLengthConnMsgs
  739. }
  740. if (iNdEx + skippy) > l {
  741. return io.ErrUnexpectedEOF
  742. }
  743. iNdEx += skippy
  744. }
  745. }
  746. if iNdEx > l {
  747. return io.ErrUnexpectedEOF
  748. }
  749. return nil
  750. }
  751. func (m *Packet) Unmarshal(dAtA []byte) error {
  752. l := len(dAtA)
  753. iNdEx := 0
  754. for iNdEx < l {
  755. preIndex := iNdEx
  756. var wire uint64
  757. for shift := uint(0); ; shift += 7 {
  758. if shift >= 64 {
  759. return ErrIntOverflowConnMsgs
  760. }
  761. if iNdEx >= l {
  762. return io.ErrUnexpectedEOF
  763. }
  764. b := dAtA[iNdEx]
  765. iNdEx++
  766. wire |= uint64(b&0x7F) << shift
  767. if b < 0x80 {
  768. break
  769. }
  770. }
  771. fieldNum := int32(wire >> 3)
  772. wireType := int(wire & 0x7)
  773. if wireType == 4 {
  774. return fmt.Errorf("proto: Packet: wiretype end group for non-group")
  775. }
  776. if fieldNum <= 0 {
  777. return fmt.Errorf("proto: Packet: illegal tag %d (wire type %d)", fieldNum, wire)
  778. }
  779. switch fieldNum {
  780. case 1:
  781. if wireType != 2 {
  782. return fmt.Errorf("proto: wrong wireType = %d for field PacketPing", wireType)
  783. }
  784. var msglen int
  785. for shift := uint(0); ; shift += 7 {
  786. if shift >= 64 {
  787. return ErrIntOverflowConnMsgs
  788. }
  789. if iNdEx >= l {
  790. return io.ErrUnexpectedEOF
  791. }
  792. b := dAtA[iNdEx]
  793. iNdEx++
  794. msglen |= int(b&0x7F) << shift
  795. if b < 0x80 {
  796. break
  797. }
  798. }
  799. if msglen < 0 {
  800. return ErrInvalidLengthConnMsgs
  801. }
  802. postIndex := iNdEx + msglen
  803. if postIndex < 0 {
  804. return ErrInvalidLengthConnMsgs
  805. }
  806. if postIndex > l {
  807. return io.ErrUnexpectedEOF
  808. }
  809. v := &PacketPing{}
  810. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  811. return err
  812. }
  813. m.Sum = &Packet_PacketPing{v}
  814. iNdEx = postIndex
  815. case 2:
  816. if wireType != 2 {
  817. return fmt.Errorf("proto: wrong wireType = %d for field PacketPong", wireType)
  818. }
  819. var msglen int
  820. for shift := uint(0); ; shift += 7 {
  821. if shift >= 64 {
  822. return ErrIntOverflowConnMsgs
  823. }
  824. if iNdEx >= l {
  825. return io.ErrUnexpectedEOF
  826. }
  827. b := dAtA[iNdEx]
  828. iNdEx++
  829. msglen |= int(b&0x7F) << shift
  830. if b < 0x80 {
  831. break
  832. }
  833. }
  834. if msglen < 0 {
  835. return ErrInvalidLengthConnMsgs
  836. }
  837. postIndex := iNdEx + msglen
  838. if postIndex < 0 {
  839. return ErrInvalidLengthConnMsgs
  840. }
  841. if postIndex > l {
  842. return io.ErrUnexpectedEOF
  843. }
  844. v := &PacketPong{}
  845. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  846. return err
  847. }
  848. m.Sum = &Packet_PacketPong{v}
  849. iNdEx = postIndex
  850. case 3:
  851. if wireType != 2 {
  852. return fmt.Errorf("proto: wrong wireType = %d for field PacketMsg", wireType)
  853. }
  854. var msglen int
  855. for shift := uint(0); ; shift += 7 {
  856. if shift >= 64 {
  857. return ErrIntOverflowConnMsgs
  858. }
  859. if iNdEx >= l {
  860. return io.ErrUnexpectedEOF
  861. }
  862. b := dAtA[iNdEx]
  863. iNdEx++
  864. msglen |= int(b&0x7F) << shift
  865. if b < 0x80 {
  866. break
  867. }
  868. }
  869. if msglen < 0 {
  870. return ErrInvalidLengthConnMsgs
  871. }
  872. postIndex := iNdEx + msglen
  873. if postIndex < 0 {
  874. return ErrInvalidLengthConnMsgs
  875. }
  876. if postIndex > l {
  877. return io.ErrUnexpectedEOF
  878. }
  879. v := &PacketMsg{}
  880. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  881. return err
  882. }
  883. m.Sum = &Packet_PacketMsg{v}
  884. iNdEx = postIndex
  885. default:
  886. iNdEx = preIndex
  887. skippy, err := skipConnMsgs(dAtA[iNdEx:])
  888. if err != nil {
  889. return err
  890. }
  891. if skippy < 0 {
  892. return ErrInvalidLengthConnMsgs
  893. }
  894. if (iNdEx + skippy) < 0 {
  895. return ErrInvalidLengthConnMsgs
  896. }
  897. if (iNdEx + skippy) > l {
  898. return io.ErrUnexpectedEOF
  899. }
  900. iNdEx += skippy
  901. }
  902. }
  903. if iNdEx > l {
  904. return io.ErrUnexpectedEOF
  905. }
  906. return nil
  907. }
  908. func skipConnMsgs(dAtA []byte) (n int, err error) {
  909. l := len(dAtA)
  910. iNdEx := 0
  911. depth := 0
  912. for iNdEx < l {
  913. var wire uint64
  914. for shift := uint(0); ; shift += 7 {
  915. if shift >= 64 {
  916. return 0, ErrIntOverflowConnMsgs
  917. }
  918. if iNdEx >= l {
  919. return 0, io.ErrUnexpectedEOF
  920. }
  921. b := dAtA[iNdEx]
  922. iNdEx++
  923. wire |= (uint64(b) & 0x7F) << shift
  924. if b < 0x80 {
  925. break
  926. }
  927. }
  928. wireType := int(wire & 0x7)
  929. switch wireType {
  930. case 0:
  931. for shift := uint(0); ; shift += 7 {
  932. if shift >= 64 {
  933. return 0, ErrIntOverflowConnMsgs
  934. }
  935. if iNdEx >= l {
  936. return 0, io.ErrUnexpectedEOF
  937. }
  938. iNdEx++
  939. if dAtA[iNdEx-1] < 0x80 {
  940. break
  941. }
  942. }
  943. case 1:
  944. iNdEx += 8
  945. case 2:
  946. var length int
  947. for shift := uint(0); ; shift += 7 {
  948. if shift >= 64 {
  949. return 0, ErrIntOverflowConnMsgs
  950. }
  951. if iNdEx >= l {
  952. return 0, io.ErrUnexpectedEOF
  953. }
  954. b := dAtA[iNdEx]
  955. iNdEx++
  956. length |= (int(b) & 0x7F) << shift
  957. if b < 0x80 {
  958. break
  959. }
  960. }
  961. if length < 0 {
  962. return 0, ErrInvalidLengthConnMsgs
  963. }
  964. iNdEx += length
  965. case 3:
  966. depth++
  967. case 4:
  968. if depth == 0 {
  969. return 0, ErrUnexpectedEndOfGroupConnMsgs
  970. }
  971. depth--
  972. case 5:
  973. iNdEx += 4
  974. default:
  975. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  976. }
  977. if iNdEx < 0 {
  978. return 0, ErrInvalidLengthConnMsgs
  979. }
  980. if depth == 0 {
  981. return iNdEx, nil
  982. }
  983. }
  984. return 0, io.ErrUnexpectedEOF
  985. }
  986. var (
  987. ErrInvalidLengthConnMsgs = fmt.Errorf("proto: negative length found during unmarshaling")
  988. ErrIntOverflowConnMsgs = fmt.Errorf("proto: integer overflow")
  989. ErrUnexpectedEndOfGroupConnMsgs = fmt.Errorf("proto: unexpected end of group")
  990. )