Documentation ¶
Index ¶
Constants ¶
View Source
const ( Choke MessageType = iota Unchoke // 1 Interested // 2 NotInterested // 3 Have // 4 Bitfield // 5 Request // 6 Piece // 7 Cancel // 8 Port // 9 // BEP 6 Suggest = 0xd // 13 HaveAll = 0xe // 14 HaveNone = 0xf // 15 Reject = 0x10 // 16 AllowedFast = 0x11 // 17 Extended = 20 HandshakeExtendedID = 0 RequestMetadataExtensionMsgType = 0 DataMetadataExtensionMsgType = 1 RejectMetadataExtensionMsgType = 2 )
View Source
const (
Protocol = "\x13BitTorrent protocol"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Decoder ¶
type Message ¶
type Message struct { Keepalive bool Type MessageType Index, Begin, Length Integer Piece []byte Bitfield []bool ExtendedID byte ExtendedPayload []byte Port uint16 }
func MakeCancelMessage ¶
func (Message) MarshalBinary ¶
func (Message) MustMarshalBinary ¶
type MessageType ¶
type MessageType byte
Click to show internal directories.
Click to hide internal directories.