package sock

import "github.com/tetratelabs/wazero/experimental/sock"

Index

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.

Source Files

sock.go

Version
v1.9.0 (latest)
Published
Feb 18, 2025
Platform
linux/amd64
Imports
2 packages
Last checked
4 days ago

Tools for package owners.