socket

package
v0.0.0-...-12d1b9d Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Accept4

func Accept4(fd int) (int, *netip.AddrPort)

func BindOrDie

func BindOrDie(fd int, addr *netip.AddrPort)

func Connect

func Connect(fd int, addr *netip.AddrPort) error

func CreateNonBlockOrDie

func CreateNonBlockOrDie() int

create nonblock tcp socket fd

func GetLocalAddr

func GetLocalAddr(socketfd int) *netip.AddrPort

func GetPeerAddr

func GetPeerAddr(socketfd int) *netip.AddrPort

func GetSocketError

func GetSocketError(fd int) (int, error)

func IsSelfConnect

func IsSelfConnect(fd int) bool

func ListenOrDie

func ListenOrDie(fd int)

func SetKeepAlive

func SetKeepAlive(fd int, on bool)

func SetReuseAddr

func SetReuseAddr(fd int, isReuse bool)

func SetReusePort

func SetReusePort(fd int, isReuse bool)

func SetTcpNoDelay

func SetTcpNoDelay(fd int, on bool)

func ShutDownWrite

func ShutDownWrite(fd int)

Types

This section is empty.

Jump to

Keyboard shortcuts

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