Versions in this module Expand all Collapse all v1 v1.0.2 May 30, 2021 v1.0.1 May 30, 2021 v1.0.0 May 29, 2021 Changes in this version + const AllowedFast + const Bitfield + const Cancel + const Choke + const Extension + const ExtensionIDHandshake + const ExtensionIDMetadata + const ExtensionIDPEX + const ExtensionKeyMetadata + const ExtensionKeyPEX + const ExtensionMetadataMessageTypeData + const ExtensionMetadataMessageTypeReject + const ExtensionMetadataMessageTypeRequest + const Have + const HaveAll + const HaveNone + const Interested + const NotInterested + const Piece + const Port + const Reject + const Request + const Suggest + const Unchoke + type AllowedFastMessage struct + type BitfieldMessage struct + Data []byte + func (m *BitfieldMessage) Read(b []byte) (n int, err error) + func (m BitfieldMessage) ID() MessageID + type CancelMessage struct + func (m CancelMessage) ID() MessageID + type ChokeMessage struct + func (m ChokeMessage) ID() MessageID + func (m ChokeMessage) Read(b []byte) (int, error) + type ExtensionHandshakeMessage struct + M map[string]uint8 + MetadataSize int + RequestQueue int + V string + YourIP string + func NewExtensionHandshake(metadataSize uint32, version string, yourip net.IP, requestQueueLength int) ExtensionHandshakeMessage + type ExtensionMessage struct + ExtendedMessageID uint8 + Payload interface{} + func (m *ExtensionMessage) UnmarshalBinary(data []byte) error + func (m ExtensionMessage) ID() MessageID + func (m ExtensionMessage) Read([]byte) (int, error) + func (m ExtensionMessage) WriteTo(w io.Writer) (n int64, err error) + type ExtensionMetadataMessage struct + Data []byte + Piece uint32 + TotalSize int + Type int + type ExtensionPEXMessage struct + Added string + Dropped string + type HaveAllMessage struct + func (m HaveAllMessage) ID() MessageID + func (m HaveAllMessage) Read(b []byte) (int, error) + type HaveMessage struct + Index uint32 + func (m HaveMessage) ID() MessageID + func (m HaveMessage) Read(b []byte) (int, error) + type HaveNoneMessage struct + func (m HaveNoneMessage) ID() MessageID + func (m HaveNoneMessage) Read(b []byte) (int, error) + type InterestedMessage struct + func (m InterestedMessage) ID() MessageID + func (m InterestedMessage) Read(b []byte) (int, error) + type Message interface + ID func() MessageID + type MessageID uint8 + func (m MessageID) String() string + type NotInterestedMessage struct + func (m NotInterestedMessage) ID() MessageID + func (m NotInterestedMessage) Read(b []byte) (int, error) + type PieceMessage struct + Begin uint32 + Index uint32 + func (m PieceMessage) ID() MessageID + func (m PieceMessage) Read(b []byte) (int, error) + type PortMessage struct + Port uint16 + func (m PortMessage) ID() MessageID + func (m PortMessage) Read(b []byte) (n int, err error) + type RejectMessage struct + func (m RejectMessage) ID() MessageID + type RequestMessage struct + Begin uint32 + Index uint32 + Length uint32 + func (m RequestMessage) ID() MessageID + func (m RequestMessage) Read(b []byte) (int, error) + type UnchokeMessage struct + func (m UnchokeMessage) ID() MessageID + func (m UnchokeMessage) Read(b []byte) (int, error)