您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

19 行
364 B

  1. package packet
  2. // DISCONNECT represents a DISCONNECT Packet.
  3. type DISCONNECT struct {
  4. base
  5. }
  6. // NewDISCONNECT creates and returns a DISCONNECT Packet.
  7. func NewDISCONNECT() Packet {
  8. // Create a DISCONNECT Packet.
  9. p := &DISCONNECT{}
  10. // Set the fixed header to the Packet.
  11. p.fixedHeader = []byte{TypeDISCONNECT << 4, 0x00}
  12. // Return the Packet.
  13. return p
  14. }