diff --git a/client.go b/client.go index 0377118d..600a3ddc 100644 --- a/client.go +++ b/client.go @@ -487,16 +487,16 @@ func (c *Client) handleMessage(msgType int, data []byte) error { Data: data, Type: int32(payload.Type), Encrypted: payloadMsg.Encrypted, - Pid: payload.Pid, - NoAck: payload.NoAck, + MessageId: payload.MessageId, + NoReply: payload.NoReply, } } - if len(payload.ReplyToPid) > 0 { - pidString := string(payload.ReplyToPid) - onReply, ok := c.responseChannels.Get(pidString) + if len(payload.ReplyToId) > 0 { + msgIDString := string(payload.ReplyToId) + onReply, ok := c.responseChannels.Get(msgIDString) if ok { - c.responseChannels.Delete(pidString) + c.responseChannels.Delete(msgIDString) onReply.(*OnMessage).receive(msg, false) } return nil @@ -506,13 +506,13 @@ func (c *Client) handleMessage(msgType int, data []byte) error { return nil } - if payload.NoAck { + if payload.NoReply { msg.reply = func(data interface{}) error { return nil } } else { msg.reply = func(data interface{}) error { - payload, err := newReplyPayload(data, payload.Pid) + payload, err := newReplyPayload(data, payload.MessageId) if err != nil { return err } @@ -733,7 +733,7 @@ func (c *Client) Send(dests *StringArray, data interface{}, config *MessageConfi return nil, err } - payload, err := newMessagePayload(data, config.MessageID, config.NoAck) + payload, err := newMessagePayload(data, config.MessageID, config.NoReply) if err != nil { return nil, err } @@ -743,9 +743,9 @@ func (c *Client) Send(dests *StringArray, data interface{}, config *MessageConfi } var onReply *OnMessage - if !config.NoAck { + if !config.NoReply { onReply = NewOnMessage(1, nil) - c.responseChannels.Add(string(payload.Pid), onReply, cache.DefaultExpiration) + c.responseChannels.Add(string(payload.MessageId), onReply, cache.DefaultExpiration) } return onReply, nil diff --git a/config.go b/config.go index aba4cc67..7b817f86 100644 --- a/config.go +++ b/config.go @@ -93,7 +93,7 @@ func DefaultClientConfig() *ClientConfig { type MessageConfig struct { Unencrypted bool - NoAck bool + NoReply bool MaxHoldingSeconds int32 MessageID []byte @@ -105,7 +105,7 @@ type MessageConfig struct { var defaultMessageConfig = MessageConfig{ Unencrypted: false, - NoAck: false, + NoReply: false, MaxHoldingSeconds: 0, MessageID: nil, Offset: 0, diff --git a/message.go b/message.go index 9dc0e71e..0e6ea8ee 100644 --- a/message.go +++ b/message.go @@ -27,8 +27,8 @@ type Message struct { Data []byte Type int32 Encrypted bool - Pid []byte - NoAck bool + MessageId []byte + NoReply bool reply func(interface{}) error } @@ -66,28 +66,28 @@ func decrypt(message []byte, nonce [nonceSize]byte, sharedKey *[sharedKeySize]by return decrypted, nil } -func newBinaryPayload(data, pid, replyToPid []byte, noAck bool) (*payloads.Payload, error) { - if len(pid) == 0 && len(replyToPid) == 0 { +func newBinaryPayload(data, messageId, replyToId []byte, noReply bool) (*payloads.Payload, error) { + if len(messageId) == 0 && len(replyToId) == 0 { var err error - pid, err = RandomBytes(MessageIDSize) + messageId, err = RandomBytes(MessageIDSize) if err != nil { return nil, err } } return &payloads.Payload{ - Type: payloads.BINARY, - Pid: pid, - Data: data, - ReplyToPid: replyToPid, - NoAck: noAck, + Type: payloads.BINARY, + MessageId: messageId, + Data: data, + ReplyToId: replyToId, + NoReply: noReply, }, nil } -func newTextPayload(text string, pid, replyToPid []byte, noAck bool) (*payloads.Payload, error) { - if len(pid) == 0 && len(replyToPid) == 0 { +func newTextPayload(text string, messageId, replyToId []byte, noReply bool) (*payloads.Payload, error) { + if len(messageId) == 0 && len(replyToId) == 0 { var err error - pid, err = RandomBytes(MessageIDSize) + messageId, err = RandomBytes(MessageIDSize) if err != nil { return nil, err } @@ -99,40 +99,40 @@ func newTextPayload(text string, pid, replyToPid []byte, noAck bool) (*payloads. } return &payloads.Payload{ - Type: payloads.TEXT, - Pid: pid, - Data: data, - ReplyToPid: replyToPid, - NoAck: noAck, + Type: payloads.TEXT, + MessageId: messageId, + Data: data, + ReplyToId: replyToId, + NoReply: noReply, }, nil } -func newAckPayload(replyToPid []byte) (*payloads.Payload, error) { +func newAckPayload(replyToId []byte) (*payloads.Payload, error) { return &payloads.Payload{ - Type: payloads.ACK, - ReplyToPid: replyToPid, + Type: payloads.ACK, + ReplyToId: replyToId, }, nil } -func newMessagePayload(data interface{}, pid []byte, noAck bool) (*payloads.Payload, error) { +func newMessagePayload(data interface{}, messageId []byte, noReply bool) (*payloads.Payload, error) { switch v := data.(type) { case []byte: - return newBinaryPayload(v, pid, nil, noAck) + return newBinaryPayload(v, messageId, nil, noReply) case string: - return newTextPayload(v, pid, nil, noAck) + return newTextPayload(v, messageId, nil, noReply) default: return nil, ErrInvalidPayloadType } } -func newReplyPayload(data interface{}, replyToPid []byte) (*payloads.Payload, error) { +func newReplyPayload(data interface{}, replyToId []byte) (*payloads.Payload, error) { switch v := data.(type) { case []byte: - return newBinaryPayload(v, nil, replyToPid, false) + return newBinaryPayload(v, nil, replyToId, false) case string: - return newTextPayload(v, nil, replyToPid, false) + return newTextPayload(v, nil, replyToId, false) case nil: - return newAckPayload(replyToPid) + return newAckPayload(replyToId) default: return nil, ErrInvalidPayloadType } diff --git a/multiclient.go b/multiclient.go index 3c1c93f6..c579845a 100644 --- a/multiclient.go +++ b/multiclient.go @@ -151,7 +151,7 @@ func NewMultiClient(account *Account, baseIdentifier string, numSubClients int, if !msg.Encrypted { continue } - err := m.handleSessionMsg(addIdentifier("", i-offset), msg.Src, msg.Pid, msg.Data) + err := m.handleSessionMsg(addIdentifier("", i-offset), msg.Src, msg.MessageId, msg.Data) if err != nil { if err != ncp.ErrSessionClosed && err != errAddrNotAllowed { log.Println(err) @@ -159,20 +159,20 @@ func NewMultiClient(account *Account, baseIdentifier string, numSubClients int, continue } } else { - cacheKey := string(msg.Pid) + cacheKey := string(msg.MessageId) if _, ok := msgCache.Get(cacheKey); ok { continue } msgCache.Set(cacheKey, struct{}{}, cache.DefaultExpiration) msg.Src, _ = removeIdentifier(msg.Src) - if msg.NoAck { + if msg.NoReply { msg.reply = func(data interface{}) error { return nil } } else { msg.reply = func(data interface{}) error { - payload, err := newReplyPayload(data, msg.Pid) + payload, err := newReplyPayload(data, msg.MessageId) if err != nil { return err } @@ -202,7 +202,7 @@ func (m *MultiClient) SendWithClient(clientID int, dests *StringArray, data inte return nil, err } - payload, err := newMessagePayload(data, config.MessageID, config.NoAck) + payload, err := newMessagePayload(data, config.MessageID, config.NoReply) if err != nil { return nil, err } @@ -212,9 +212,9 @@ func (m *MultiClient) SendWithClient(clientID int, dests *StringArray, data inte } var onReply *OnMessage - if !config.NoAck { + if !config.NoReply { onReply = NewOnMessage(1, nil) - client.responseChannels.Add(string(payload.Pid), onReply, cache.DefaultExpiration) + client.responseChannels.Add(string(payload.MessageId), onReply, cache.DefaultExpiration) } return onReply, nil @@ -252,7 +252,7 @@ func (m *MultiClient) Send(dests *StringArray, data interface{}, config *Message return nil, err } - payload, err := newMessagePayload(data, config.MessageID, config.NoAck) + payload, err := newMessagePayload(data, config.MessageID, config.NoReply) if err != nil { return nil, err } @@ -264,13 +264,13 @@ func (m *MultiClient) Send(dests *StringArray, data interface{}, config *Message success := make(chan struct{}, 0) fail := make(chan struct{}, 0) - if !config.NoAck { + if !config.NoReply { onReply = NewOnMessage(1, nil) onRawReply = NewOnMessage(1, nil) // response channel is added first to prevent some client fail to handle response if send finish before receive response for _, client := range m.Clients { - client.responseChannels.Add(string(payload.Pid), onRawReply, cache.DefaultExpiration) + client.responseChannels.Add(string(payload.MessageId), onRawReply, cache.DefaultExpiration) } } @@ -296,7 +296,7 @@ func (m *MultiClient) Send(dests *StringArray, data interface{}, config *Message } } - if !config.NoAck { + if !config.NoReply { msg := <-onRawReply.C msg.Src, _ = removeIdentifier(msg.Src) onReply.receive(msg, false) @@ -379,9 +379,9 @@ func (m *MultiClient) newSession(remoteAddr string, sessionID []byte, config *nc sort.Strings(clientIDs) return ncp.NewSession(m.addr, NewClientAddr(remoteAddr), clientIDs, nil, (func(localClientID, remoteClientID string, buf []byte, writeTimeout time.Duration) error { payload := &payloads.Payload{ - Type: payloads.SESSION, - Pid: sessionID, - Data: buf, + Type: payloads.SESSION, + MessageId: sessionID, + Data: buf, } client := clients[localClientID] if writeTimeout > 0 { diff --git a/payloads/payloads.pb.go b/payloads/payloads.pb.go index b02b8949..6f329cd5 100644 --- a/payloads/payloads.pb.go +++ b/payloads/payloads.pb.go @@ -51,7 +51,7 @@ var PayloadType_value = map[string]int32{ } func (PayloadType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_payloads_0cdaddb696aed213, []int{0} + return fileDescriptor_payloads_834d6bc1cbaabddf, []int{0} } type Message struct { @@ -64,7 +64,7 @@ type Message struct { func (m *Message) Reset() { *m = Message{} } func (*Message) ProtoMessage() {} func (*Message) Descriptor() ([]byte, []int) { - return fileDescriptor_payloads_0cdaddb696aed213, []int{0} + return fileDescriptor_payloads_834d6bc1cbaabddf, []int{0} } func (m *Message) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -122,17 +122,17 @@ func (m *Message) GetEncryptedKey() []byte { } type Payload struct { - Type PayloadType `protobuf:"varint,1,opt,name=type,proto3,enum=payloads.PayloadType" json:"type,omitempty"` - Pid []byte `protobuf:"bytes,2,opt,name=pid,proto3" json:"pid,omitempty"` - Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` - ReplyToPid []byte `protobuf:"bytes,4,opt,name=reply_to_pid,json=replyToPid,proto3" json:"reply_to_pid,omitempty"` - NoAck bool `protobuf:"varint,5,opt,name=no_ack,json=noAck,proto3" json:"no_ack,omitempty"` + Type PayloadType `protobuf:"varint,1,opt,name=type,proto3,enum=payloads.PayloadType" json:"type,omitempty"` + MessageId []byte `protobuf:"bytes,2,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"` + Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` + ReplyToId []byte `protobuf:"bytes,4,opt,name=reply_to_id,json=replyToId,proto3" json:"reply_to_id,omitempty"` + NoReply bool `protobuf:"varint,5,opt,name=no_reply,json=noReply,proto3" json:"no_reply,omitempty"` } func (m *Payload) Reset() { *m = Payload{} } func (*Payload) ProtoMessage() {} func (*Payload) Descriptor() ([]byte, []int) { - return fileDescriptor_payloads_0cdaddb696aed213, []int{1} + return fileDescriptor_payloads_834d6bc1cbaabddf, []int{1} } func (m *Payload) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -168,9 +168,9 @@ func (m *Payload) GetType() PayloadType { return BINARY } -func (m *Payload) GetPid() []byte { +func (m *Payload) GetMessageId() []byte { if m != nil { - return m.Pid + return m.MessageId } return nil } @@ -182,16 +182,16 @@ func (m *Payload) GetData() []byte { return nil } -func (m *Payload) GetReplyToPid() []byte { +func (m *Payload) GetReplyToId() []byte { if m != nil { - return m.ReplyToPid + return m.ReplyToId } return nil } -func (m *Payload) GetNoAck() bool { +func (m *Payload) GetNoReply() bool { if m != nil { - return m.NoAck + return m.NoReply } return false } @@ -203,7 +203,7 @@ type TextData struct { func (m *TextData) Reset() { *m = TextData{} } func (*TextData) ProtoMessage() {} func (*TextData) Descriptor() ([]byte, []int) { - return fileDescriptor_payloads_0cdaddb696aed213, []int{2} + return fileDescriptor_payloads_834d6bc1cbaabddf, []int{2} } func (m *TextData) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -307,16 +307,16 @@ func (this *Payload) Equal(that interface{}) bool { if this.Type != that1.Type { return false } - if !bytes.Equal(this.Pid, that1.Pid) { + if !bytes.Equal(this.MessageId, that1.MessageId) { return false } if !bytes.Equal(this.Data, that1.Data) { return false } - if !bytes.Equal(this.ReplyToPid, that1.ReplyToPid) { + if !bytes.Equal(this.ReplyToId, that1.ReplyToId) { return false } - if this.NoAck != that1.NoAck { + if this.NoReply != that1.NoReply { return false } return true @@ -365,10 +365,10 @@ func (this *Payload) GoString() string { s := make([]string, 0, 9) s = append(s, "&payloads.Payload{") s = append(s, "Type: "+fmt.Sprintf("%#v", this.Type)+",\n") - s = append(s, "Pid: "+fmt.Sprintf("%#v", this.Pid)+",\n") + s = append(s, "MessageId: "+fmt.Sprintf("%#v", this.MessageId)+",\n") s = append(s, "Data: "+fmt.Sprintf("%#v", this.Data)+",\n") - s = append(s, "ReplyToPid: "+fmt.Sprintf("%#v", this.ReplyToPid)+",\n") - s = append(s, "NoAck: "+fmt.Sprintf("%#v", this.NoAck)+",\n") + s = append(s, "ReplyToId: "+fmt.Sprintf("%#v", this.ReplyToId)+",\n") + s = append(s, "NoReply: "+fmt.Sprintf("%#v", this.NoReply)+",\n") s = append(s, "}") return strings.Join(s, "") } @@ -456,11 +456,11 @@ func (m *Payload) MarshalTo(dAtA []byte) (int, error) { i++ i = encodeVarintPayloads(dAtA, i, uint64(m.Type)) } - if len(m.Pid) > 0 { + if len(m.MessageId) > 0 { dAtA[i] = 0x12 i++ - i = encodeVarintPayloads(dAtA, i, uint64(len(m.Pid))) - i += copy(dAtA[i:], m.Pid) + i = encodeVarintPayloads(dAtA, i, uint64(len(m.MessageId))) + i += copy(dAtA[i:], m.MessageId) } if len(m.Data) > 0 { dAtA[i] = 0x1a @@ -468,16 +468,16 @@ func (m *Payload) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintPayloads(dAtA, i, uint64(len(m.Data))) i += copy(dAtA[i:], m.Data) } - if len(m.ReplyToPid) > 0 { + if len(m.ReplyToId) > 0 { dAtA[i] = 0x22 i++ - i = encodeVarintPayloads(dAtA, i, uint64(len(m.ReplyToPid))) - i += copy(dAtA[i:], m.ReplyToPid) + i = encodeVarintPayloads(dAtA, i, uint64(len(m.ReplyToId))) + i += copy(dAtA[i:], m.ReplyToId) } - if m.NoAck { + if m.NoReply { dAtA[i] = 0x28 i++ - if m.NoAck { + if m.NoReply { dAtA[i] = 1 } else { dAtA[i] = 0 @@ -547,9 +547,9 @@ func NewPopulatedPayload(r randyPayloads, easy bool) *Payload { this := &Payload{} this.Type = PayloadType([]int32{0, 1, 2, 3}[r.Intn(4)]) v4 := r.Intn(100) - this.Pid = make([]byte, v4) + this.MessageId = make([]byte, v4) for i := 0; i < v4; i++ { - this.Pid[i] = byte(r.Intn(256)) + this.MessageId[i] = byte(r.Intn(256)) } v5 := r.Intn(100) this.Data = make([]byte, v5) @@ -557,11 +557,11 @@ func NewPopulatedPayload(r randyPayloads, easy bool) *Payload { this.Data[i] = byte(r.Intn(256)) } v6 := r.Intn(100) - this.ReplyToPid = make([]byte, v6) + this.ReplyToId = make([]byte, v6) for i := 0; i < v6; i++ { - this.ReplyToPid[i] = byte(r.Intn(256)) + this.ReplyToId[i] = byte(r.Intn(256)) } - this.NoAck = bool(bool(r.Intn(2) == 0)) + this.NoReply = bool(bool(r.Intn(2) == 0)) if !easy && r.Intn(10) != 0 { } return this @@ -680,7 +680,7 @@ func (m *Payload) Size() (n int) { if m.Type != 0 { n += 1 + sovPayloads(uint64(m.Type)) } - l = len(m.Pid) + l = len(m.MessageId) if l > 0 { n += 1 + l + sovPayloads(uint64(l)) } @@ -688,11 +688,11 @@ func (m *Payload) Size() (n int) { if l > 0 { n += 1 + l + sovPayloads(uint64(l)) } - l = len(m.ReplyToPid) + l = len(m.ReplyToId) if l > 0 { n += 1 + l + sovPayloads(uint64(l)) } - if m.NoAck { + if m.NoReply { n += 2 } return n @@ -743,10 +743,10 @@ func (this *Payload) String() string { } s := strings.Join([]string{`&Payload{`, `Type:` + fmt.Sprintf("%v", this.Type) + `,`, - `Pid:` + fmt.Sprintf("%v", this.Pid) + `,`, + `MessageId:` + fmt.Sprintf("%v", this.MessageId) + `,`, `Data:` + fmt.Sprintf("%v", this.Data) + `,`, - `ReplyToPid:` + fmt.Sprintf("%v", this.ReplyToPid) + `,`, - `NoAck:` + fmt.Sprintf("%v", this.NoAck) + `,`, + `ReplyToId:` + fmt.Sprintf("%v", this.ReplyToId) + `,`, + `NoReply:` + fmt.Sprintf("%v", this.NoReply) + `,`, `}`, }, "") return s @@ -982,7 +982,7 @@ func (m *Payload) Unmarshal(dAtA []byte) error { } case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pid", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MessageId", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { @@ -1006,9 +1006,9 @@ func (m *Payload) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Pid = append(m.Pid[:0], dAtA[iNdEx:postIndex]...) - if m.Pid == nil { - m.Pid = []byte{} + m.MessageId = append(m.MessageId[:0], dAtA[iNdEx:postIndex]...) + if m.MessageId == nil { + m.MessageId = []byte{} } iNdEx = postIndex case 3: @@ -1044,7 +1044,7 @@ func (m *Payload) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ReplyToPid", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ReplyToId", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { @@ -1068,14 +1068,14 @@ func (m *Payload) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ReplyToPid = append(m.ReplyToPid[:0], dAtA[iNdEx:postIndex]...) - if m.ReplyToPid == nil { - m.ReplyToPid = []byte{} + m.ReplyToId = append(m.ReplyToId[:0], dAtA[iNdEx:postIndex]...) + if m.ReplyToId == nil { + m.ReplyToId = []byte{} } iNdEx = postIndex case 5: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NoAck", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NoReply", wireType) } var v int for shift := uint(0); ; shift += 7 { @@ -1092,7 +1092,7 @@ func (m *Payload) Unmarshal(dAtA []byte) error { break } } - m.NoAck = bool(v != 0) + m.NoReply = bool(v != 0) default: iNdEx = preIndex skippy, err := skipPayloads(dAtA[iNdEx:]) @@ -1298,33 +1298,33 @@ var ( ErrIntOverflowPayloads = fmt.Errorf("proto: integer overflow") ) -func init() { proto.RegisterFile("payloads/payloads.proto", fileDescriptor_payloads_0cdaddb696aed213) } +func init() { proto.RegisterFile("payloads/payloads.proto", fileDescriptor_payloads_834d6bc1cbaabddf) } -var fileDescriptor_payloads_0cdaddb696aed213 = []byte{ - // 394 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00,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fb, 0x23, 0x6a, 0x87, 0x23, 0x6a, 0xf3, 0xba, 0xfa, 0xb3, 0xe7, 0x7f, 0x03, 0x00, 0x00, - 0xff, 0xff, 0x06, 0x5f, 0x0c, 0xf5, 0x07, 0x02, 0x00, 0x00, +var fileDescriptor_payloads_834d6bc1cbaabddf = []byte{ + // 397 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x91, 0x31, 0xcf, 0xd2, 0x50, + 0x14, 0x86, 0x7b, 0xa1, 0xd0, 0xf6, 0x80, 0xa6, 0xb9, 0xd1, 0x58, 0x8d, 0x9e, 0x10, 0x5c, 0xd0, + 0x44, 0x48, 0x74, 0x32, 0x71, 0x01, 0x65, 0x68, 0x88, 0x68, 0x4a, 0x07, 0x9d, 0x9a, 0x42, 0xaf, + 0x95, 0x08, 0xbd, 0x0d, 0x5c, 0x12, 0x9a, 0x38, 0xf8, 0x13, 0xfc, 0x0d, 0x4e, 0xfe, 0x04, 0x7f, + 0x82, 0x23, 0x23, 0xa3, 0xbd, 0x2c, 0x8e, 0x8c, 0xdf, 0xf8, 0x85, 0xdb, 0xc2, 0xf7, 0x6d, 0xef, + 0xf3, 0xf6, 0x3d, 0xf7, 0xbc, 0x27, 0x85, 0x07, 0x69, 0x98, 0x2d, 0x78, 0x18, 0xad, 0x7b, 0x67, + 0xd1, 0x4d, 0x57, 0x5c, 0x70, 0x6a, 0x9e, 0xf9, 0xd1, 0x8b, 0x78, 0x2e, 0xbe, 0x6e, 0xa6, 0xdd, + 0x19, 0x5f, 0xf6, 0x62, 0x1e, 0xf3, 0x9e, 0x0a, 0x4c, 0x37, 0x5f, 0x14, 0x29, 0x50, 0xaa, 0x18, + 0x6c, 0x7f, 0x07, 0xe3, 0x3d, 0x5b, 0xaf, 0xc3, 0x98, 0x51, 0x07, 0x8c, 0xf2, 0x15, 0x87, 0xb4, + 0x48, 0xa7, 0xe9, 0x9d, 0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 0x1d, 0xbc, 0xd9, 0xe5, + 0xa8, 0xed, 0x73, 0xd4, 0x8e, 0x39, 0x92, 0xab, 0x1c, 0xc9, 0x0f, 0x89, 0xe4, 0xb7, 0x44, 0xf2, + 0x47, 0x22, 0xf9, 0x2b, 0x91, 0xec, 0x24, 0x92, 0x7f, 0x12, 0xc9, 0x7f, 0x89, 0xda, 0x51, 0x22, + 0xf9, 0x79, 0x40, 0x6d, 0x77, 0x40, 0x6d, 0x7f, 0x40, 0x6d, 0x5a, 0x57, 0xbf, 0xf0, 0xd5, 0x75, + 0x00, 0x00, 0x00, 0xff, 0xff, 0x29, 0x30, 0x1c, 0xf5, 0x16, 0x02, 0x00, 0x00, } diff --git a/payloads/payloads.proto b/payloads/payloads.proto index 531d0c0c..1bdfd2a9 100644 --- a/payloads/payloads.proto +++ b/payloads/payloads.proto @@ -31,10 +31,10 @@ message Message { message Payload { PayloadType type = 1; - bytes pid = 2; + bytes message_id = 2; bytes data = 3; - bytes reply_to_pid = 4; - bool no_ack = 5; + bytes reply_to_id = 4; + bool no_reply = 5; } message TextData {