util

package
v0.0.0-...-57e5bf5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 20, 2016 License: MPL-2.0 Imports: 7 Imported by: 0

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

type CompactPeer struct {
	IP   net.IP
	Port int
}

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

Directories

Path Synopsis
Package dirwatch provides filesystem-notification based tracking of torrent info files and magnet URIs in a directory.
Package dirwatch provides filesystem-notification based tracking of torrent info files and magnet URIs in a directory.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL