Movatterモバイル変換


[0]ホーム

URL:


sockopts

package
v1.92.3Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2025 License:BSD-3-ClauseImports:4Imported by:0

Details

Repository

github.com/tailscale/tailscale

Links

Documentation

Overview

Package sockopts contains logic for applying socket options.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

funcSetBufferSize

func SetBufferSize(pconnnettype.PacketConn, directionBufferDirection, sizeint) (errForceerror, errPortableerror)

SetBufferSize sets pconn's buffer to size for direction. It attempts(errForce) to set SO_SNDBUFFORCE or SO_RECVBUFFORCE which can overcome thelimit of net.core.{r,w}mem_max, but require CAP_NET_ADMIN. It falls back tothe portable implementation (errPortable) if that fails, which may besilently capped to net.core.{r,w}mem_max.

If pconn is not a*net.UDPConn, then SetBufferSize is no-op.

funcSetICMPErrImmunity

func SetICMPErrImmunity(pconnnettype.PacketConn)error

SetICMPErrImmunity is no-op on non-Windows.

Types

typeBufferDirection

type BufferDirectionstring

BufferDirection represents either the read/receive or write/send directionof a socket buffer.

const (ReadDirectionBufferDirection = "read"WriteDirectionBufferDirection = "write")

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp