network

package
v0.0.0-...-8a3301c Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2017 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddrToUint64

func AddrToUint64(ip string, port int) (uint64, error)

func NewPeerNetWork

func NewPeerNetWork(cfg NetWorkConfig, receiver comm.Receiver) (comm.NetWork, error)

func ResolveAddr

func ResolveAddr(network, addr string) (net.Addr, error)

func Uint64ToAddr

func Uint64ToAddr(i uint64) string

Types

type NetWorkConfig

type NetWorkConfig struct {
	NetWork       string
	Token         string
	ListenAddr    string
	ListenTimeout time.Duration
	ReadTimeout   time.Duration
	ServerChanCap int
	DialTimeout   time.Duration
	WriteTimeout  time.Duration
	KeepAlive     time.Duration
	ClientChanCap int
}

Jump to

Keyboard shortcuts

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