sock

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithConfig

func WithConfig(ctx context.Context, config Config) context.Context

WithConfig registers the given Config into the given context.Context.

Types

type Config

type Config interface {
	// WithTCPListener configures the host to set up the given host:port listener.
	WithTCPListener(host string, port int) Config
}

Config configures the host to open TCP sockets and allows guest access to them.

Instantiating a module with listeners results in pre-opened sockets associated with file-descriptors numerically after pre-opened files.

func NewConfig

func NewConfig() Config

NewConfig returns a Config for module instantiation.

Jump to

Keyboard shortcuts

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