network

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2020 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	L4Protocol = "tcp"
)

Variables

This section is empty.

Functions

func IsLocalAddress added in v0.12.0

func IsLocalAddress(src LocalAddressSource, addr *Address) bool

IsLocalAddress returns true if network endpoint from local address source is equal to network endpoint of passed address.

func Listen

func Listen(addr multiaddr.Multiaddr) (net.Listener, error)

Listen announces on the local network address.

Types

type Address

type Address struct {
	// contains filtered or unexported fields
}

Address represents the NeoFS node network address.

func AddressFromString added in v0.12.0

func AddressFromString(s string) (*Address, error)

AddressFromString restores address from a multiaddr string representation.

func (Address) IPAddrString added in v0.12.0

func (a Address) IPAddrString() (string, error)

IPAddrString returns network endpoint address in string format.

func (Address) String added in v0.12.0

func (a Address) String() string

String returns multiaddr string

type LocalAddressSource added in v0.12.0

type LocalAddressSource interface {
	LocalAddress() *Address
}

LocalAddressSource is an interface of local network address container with read access.

Directories

Path Synopsis
transport

Jump to

Keyboard shortcuts

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