選択できるのは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. }