/
githubmirror
/
ignition
Обзор
Документация
Войти
/
githubmirror
/
ignition
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
vendor/github.com/mdlayher/socket/setbuffer_others.go
16 строк
433 B
Brent Baude
providers/applehv: Add Apple Hypervisor
31 окт 2023, 00:53
31 окт 2023, 00:53
5858f58
Код
Авторство
О чём код?
//go:build !linux // +build !linux package socket import "golang.org/x/sys/unix" // setReadBuffer wraps the SO_RCVBUF setsockopt(2) option. func (c *Conn) setReadBuffer(bytes int) error { return c.SetsockoptInt(unix.SOL_SOCKET, unix.SO_RCVBUF, bytes) } // setWriteBuffer wraps the SO_SNDBUF setsockopt(2) option. func (c *Conn) setWriteBuffer(bytes int) error { return c.SetsockoptInt(unix.SOL_SOCKET, unix.SO_SNDBUF, bytes) }