utils

package
v0.7.14-12-gd639e577 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const MaxNameLen = 4096

MaxNameLen is the maximum length of the name of a file descriptor being sent using SendFile. The name of the file handle returned by RecvFile will never be larger than this value.

Variables

This section is empty.

Functions

func RecvFile

func RecvFile(socket *os.File) (_ *os.File, Err error)

RecvFile waits for a file descriptor to be sent over the given AF_UNIX socket. The file name of the remote file descriptor will be recreated locally (it is sent as non-auxiliary data in the same payload).

func SendFile

func SendFile(socket *os.File, file *os.File) error

SendFile sends a file over the given AF_UNIX socket. file.Name() is also included so that if the other end uses RecvFile, the file will have the same name information.

func SendRawFd

func SendRawFd(socket *os.File, msg string, fd uintptr) error

SendRawFd sends a specific file descriptor over the given AF_UNIX socket.

Types

This section is empty.

Jump to

Keyboard shortcuts

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