systype

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 1 more Imports: 3 Imported by: 0

Documentation

Overview

Package systype provides system type such as unix.Ioves. Reuses [][]byte and []MMsghdr.

Index

Constants

View Source
const (
	// MaxLen is the maximum length for []unix.Iovec, [][]byte, []MMsghdr.
	MaxLen = 64
)

Variables

This section is empty.

Functions

func BuildMMsg

func BuildMMsg(m *MMsghdr, name, buf []byte)

BuildMMsg fills MMsghdr with name and buffer.

func PutIOData

func PutIOData(d *IOData)

PutIOData release a [][]byte.

func PutIOVECWrapper

func PutIOVECWrapper(h *IOVECWrapper)

PutIOVECWrapper release a []unix.Iovec.

func PutMMsghdrs

func PutMMsghdrs(mmsghdrs []MMsghdr)

PutMMsghdrs release a []mmsghdr.

Types

type IOData

type IOData struct {
	D [][]byte
}

IOData is a wrapper for [][]byte struct.

func GetIOData

func GetIOData(size int) ([][]byte, *IOData)

GetIOData get a [][]byte with fixed capacity. Release it using PutIOData.

type IOVECWrapper

type IOVECWrapper struct {
	// contains filtered or unexported fields
}

IOVECWrapper is a wrapper for []unix.Iovec struct.

func GetIOVECWrapper

func GetIOVECWrapper(bs [][]byte) ([]unix.Iovec, *IOVECWrapper)

GetIOVECWrapper gets a []unix.Iovec with fixed capacity of length len(bs). Release it using PutIOVECWrapper.

type MMsghdr

type MMsghdr struct {
	Hdr unix.Msghdr
	Len uint32
	// contains filtered or unexported fields
}

MMsghdr is the input parameter of recvmmsg.

func GetMMsghdrs

func GetMMsghdrs(size int) []MMsghdr

GetMMsghdrs gets a []mmsghdr with fixed capacity. Release it with PutMMsghdrs.

Jump to

Keyboard shortcuts

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