netx

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: May 11, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package netx contains network hacks

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListenTCPInterface

func ListenTCPInterface(network string, ifaceName string, port uint16) (net.Listener, []net.TCPAddr, error)

ListenTCPInterface is like net.ListenTCP but can bind to one interface only.

Internally, it listens to all host IP addresses of the given interface. If the interface name is empty, it listens on all addresses.

func MergeListeners

func MergeListeners(listeners ...net.Listener) net.Listener

MergeListeners merges multiple net.Listeners into one. Trips on the first error seen.

Types

This section is empty.

Jump to

Keyboard shortcuts

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