utils

package
v0.8.9 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2022 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Ntohs = Htons

Ntohs ...

Functions

func BoolToInt

func BoolToInt(b bool) int

BoolToInt ...

func Htons

func Htons(h uint16) uint16

Htons ...

func IPToSockaddr

func IPToSockaddr(family int, ip net.IP, port int, zone string) (syscall.Sockaddr, error)

IPToSockaddr ...

func Sockaddr

func Sockaddr(a *net.TCPAddr, family int) (syscall.Sockaddr, error)

Sockaddr ...

func SupportsIPv4

func SupportsIPv4() bool

SupportsIPv4 supportsIPv4 reports whether the platform supports IPv4 networking functionality.

func SupportsIPv4map

func SupportsIPv4map() bool

SupportsIPv4map supportsIPv4map reports whether the platform supports mapping an

IPv4 address inside an IPv6 address at transport layer
protocols. See RFC 4291, RFC 4038 and RFC 3493.

func ToBuf

func ToBuf(v interface{}) []byte

ToBuf ...

Types

This section is empty.

Jump to

Keyboard shortcuts

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