25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
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. }