netutil

package
v0.0.0-...-7e24c04 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetListener

func GetListener(hostname string, portnum int) (net.Listener, string, error)

Change: Added port as specifiable argument. If passed argument is zero functionality will be as before. * Reason: net.Listen automatically chooses which port to listen to if Port field is zero. * * Change: Added hostname as argument that supports being an empty string. * - marius

func GetLocalIP

func GetLocalIP() string

Hacky AF

func GetOpenPort

func GetOpenPort() int

func ListenOnPort

func ListenOnPort(port int) (net.Listener, error)

func ListenUdp

func ListenUdp(hostname string, portnum int) (*net.UDPConn, string, error)

Change: Added port as specifiable argument. If passed argument is zero functionality will be as before. * Reason: net.ListenUDP automatically chooses which port to listen to if Port field is zero. * * Change: Added hostname as argument that supports being an empty string. * - marius

func LocalIP

func LocalIP() (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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