1234567891011121314151617181920212223242526272829 |
- package protocol
- type PacketContext struct {
- ReceiveAddress []byte
- Id string
- }
- // SetReceiveAddress 设置接收表地址
- func (a *PacketContext) SetReceiveAddress(address []byte) {
- a.ReceiveAddress = address
- }
- // GetReceiveAddress 获取接收表地址
- func (a *PacketContext) GetReceiveAddress() []byte {
- if a.ReceiveAddress != nil {
- return a.ReceiveAddress
- }
- return nil
- }
- // SetId 设置表号
- func (a *PacketContext) SetId(id string) {
- a.Id = id
- }
- // GetId 获取表号
- func (a *PacketContext) GetId() string {
- return a.Id
- }
|