package msg
import "github.com/rootless-containers/rootlesskit/pkg/port/builtin/msg"
Index ¶
- Constants
- func ConnectToChild(c *net.UnixConn, spec port.Spec) (int, error)
- func ConnectToChildWithRetry(socketPath string, spec port.Spec, retries int) (int, error)
- func ConnectToChildWithSocketPath(socketPath string, spec port.Spec) (int, error)
- func Initiate(c *net.UnixConn) error
- type Reply
- type Request
Constants ¶
const ( RequestTypeInit = "init" RequestTypeConnect = "connect" )
Functions ¶
func ConnectToChild ¶
ConnectToChild connects to the child UNIX socket, and obtains TCP or UDP socket FD that corresponds to the port spec.
func ConnectToChildWithRetry ¶
ConnectToChildWithRetry retries ConnectToChild every (i*5) milliseconds.
func ConnectToChildWithSocketPath ¶
ConnectToChildWithSocketPath wraps ConnectToChild
func Initiate ¶
Initiate sends "init" request to the child UNIX socket.
Types ¶
type Reply ¶
type Reply struct { Error string }
Reply may contain FD as OOB
type Request ¶
Request and Response are encoded as JSON with uint32le length header.
Source Files ¶
- Version
- v0.9.1
- Published
- Mar 7, 2020
- Platform
- js/wasm
- Imports
- 6 packages
- Last checked
- 1 hour ago –
Tools for package owners.