unisockets

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2021 License: AGPL-3.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

View Source
const (
	PF_INET     = uint16(C.PF_INET)
	SOCK_STREAM = int32(C.SOCK_STREAM)
	SHUT_RDWR   = int32(C.SHUT_RDWR)
)

Variables

This section is empty.

Functions

func Accept

func Accept(socketFd int32, socketAddr *SockaddrIn) (int32, error)

func Bind

func Bind(socketFd int32, socketAddr *SockaddrIn) error

func Connect

func Connect(socketFd int32, socketAddr *SockaddrIn) error

func Htons

func Htons(v uint16) uint16

func Listen

func Listen(socketFd int32, socketBacklog int32) error

func Recv

func Recv(socketFd int32, socketReceivedMessage *[]byte, socketBufferLength uint32, socketFlags int32) (int32, error)

func Send

func Send(socketFd int32, socketMessageToSend []byte, socketFlags int32) (int32, error)

func Shutdown

func Shutdown(socketFd int32, socketFlags int32) error

func Socket

func Socket(socketDomain uint16, socketType int32, socketProtocol int32) (int32, error)

Types

type SockaddrIn

type SockaddrIn struct {
	SinFamily uint16
	SinPort   uint16
	SinAddr   struct {
		SAddr uint32
	}
}

Jump to

Keyboard shortcuts

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