util

package
v0.0.0-...-df6d21c Latest Latest
Warning

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

Go to latest
Published: May 16, 2015 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddrIP

func AddrIP(addr net.Addr) net.IP

func AddrPort

func AddrPort(addr net.Addr) int

Extracts the port as an integer from an address string.

func CopyExact

func CopyExact(dest interface{}, src interface{})

Types

type CompactPeer

type CompactPeer struct {
	IP   [4]byte
	Port uint16
}

func (*CompactPeer) UnmarshalBinary

func (cp *CompactPeer) UnmarshalBinary(b []byte) (err error)

type CompactPeers

type CompactPeers []CompactPeer

func (*CompactPeers) UnmarshalBencode

func (me *CompactPeers) UnmarshalBencode(bb []byte) (err error)

func (*CompactPeers) UnmarshalBinary

func (me *CompactPeers) UnmarshalBinary(b []byte) (err error)

func (CompactPeers) WriteBinary

func (me CompactPeers) WriteBinary(w io.Writer) 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