util

package
v0.0.0-...-8135c48 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2016 License: MPL-2.0, MIT 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 (me CompactIPv4Peers) MarshalBinary() (ret []byte, err error)

func (*CompactIPv4Peers) UnmarshalBencode

func (me *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 (me CompactPeer) MarshalBencode() (ret []byte, err error)

func (*CompactPeer) UnmarshalBencode

func (me *CompactPeer) UnmarshalBencode(b []byte) (err error)

func (*CompactPeer) UnmarshalBinary

func (me *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