Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CompactIPv4Peers ¶
type CompactIPv4Peers []CompactPeer
Concatenated 6-byte peer addresses.
func (CompactIPv4Peers) MarshalBinary ¶
func (cps CompactIPv4Peers) MarshalBinary() (ret []byte, err error)
func (*CompactIPv4Peers) UnmarshalBencode ¶
func (cps *CompactIPv4Peers) UnmarshalBencode(b []byte) (err error)
This allows bencode.Unmarshal to do better than a string or []byte.
type CompactPeer ¶
Represents peer address in either IPv6 or IPv4 form.
func UnmarshalIPv4CompactPeers ¶
func UnmarshalIPv4CompactPeers(b []byte) (ret []CompactPeer, err error)
func (CompactPeer) MarshalBencode ¶
func (cp CompactPeer) MarshalBencode() (ret []byte, err error)
func (*CompactPeer) UnmarshalBencode ¶
func (cp *CompactPeer) UnmarshalBencode(b []byte) (err error)
func (*CompactPeer) UnmarshalBinary ¶
func (cp *CompactPeer) UnmarshalBinary(b []byte) error
Click to show internal directories.
Click to hide internal directories.