go/src/net/internal/socktest/switch.go

type Switch

func (sw *Switch) init() {}

// Stats returns a list of per-cookie socket statistics.
func (sw *Switch) Stats() []Stat {}

// Sockets returns mappings of socket descriptor to socket status.
func (sw *Switch) Sockets() Sockets {}

type Cookie

// Family returns an address family.
func (c Cookie) Family() int {}

// Type returns a socket type.
func (c Cookie) Type() int {}

// Protocol returns a protocol number.
func (c Cookie) Protocol() int {}

func cookie(family, sotype, proto int) Cookie {}

type Status

func (so Status) String() string {}

type Stat

func (st Stat) String() string {}

type stats

func (st stats) getLocked(c Cookie) *Stat {}

type FilterType

const FilterSocket

const FilterConnect

const FilterListen

const FilterAccept

const FilterGetsockoptInt

const FilterClose

type Filter

func (f Filter) apply(st *Status) (AfterFilter, error) {}

type AfterFilter

func (f AfterFilter) apply(st *Status) error {}

// Set deploys the socket system call filter f for the filter type t.
func (sw *Switch) Set(t FilterType, f Filter) {}