sockaddr

package module
v0.0.0-...-9ee3903 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2017 License: BSD-3-Clause Imports: 3 Imported by: 2

README

go-sockaddr - {Raw,}Sockaddr conversions

See https://groups.google.com/d/msg/golang-nuts/B-meiFfkmH0/-TxP1r6zvk8J This package extracts unexported code from syscall to help in converting between:

syscall.Sockaddr
syscall.RawSockaddrAny
C.struct_sockaddr_any
net.*Addr

Godoc:

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnyToCAny

AnyToCAny casts a *RawSockaddrAny to a *C.struct_sockaddr_any

func AnyToSockaddr

func AnyToSockaddr(rsa *syscall.RawSockaddrAny) (syscall.Sockaddr, error)

SockaddrToAny converts a syscall.RawSockaddrAny into a syscall.Sockaddr The implementation is platform dependent.

func CAnyToAny

CAnyToAny casts a *C.struct_sockaddr_any to a *RawSockaddrAny

Types

type Socklen

type Socklen uint

Socklen is a type for the length of a sockaddr.

func SockaddrToAny

func SockaddrToAny(sa syscall.Sockaddr) (*syscall.RawSockaddrAny, Socklen, error)

SockaddrToAny converts a syscall.Sockaddr into a syscall.RawSockaddrAny The implementation is platform dependent.

Directories

Path Synopsis
package sockaddrnet provides conversions between net.Addr and syscall.Sockaddr
package sockaddrnet provides conversions between net.Addr and syscall.Sockaddr

Jump to

Keyboard shortcuts

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