Documentation
¶
Overview ¶
Package net is the socket capability: the kernel I/O tier's network boundary. Opening a listener or dialing a connection crosses out of the process's shared memory into the kernel, so it happens only through a capability granted by the binary that owns the process.
A binary constructs one HostNetwork and passes it, as an IListener or an IDialer, to whatever needs it; a service receives the capability in its constructor and never calls net.Listen or net.Dial itself. The narrower protocol capabilities, candace/ipc/net/http and candace/ipc/net/grpc, are built on these two interfaces, which is also what lets a test replace the kernel with an in-memory pipe.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HostNetwork ¶
type HostNetwork struct {
// contains filtered or unexported fields
}
HostNetwork is this host's kernel network stack, granted as a capability.
func NewHostNetwork ¶
func NewHostNetwork() *HostNetwork
NewHostNetwork returns the host's network capability with the standard library's defaults.
func (*HostNetwork) DialContext ¶
func (network *HostNetwork) DialContext(ctx context.Context, kind string, address string) (stdnet.Conn, error)
DialContext opens a connection to address.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package grpc is the gRPC client-connection capability.
|
Package grpc is the gRPC client-connection capability. |
|
Package http is the HTTP capability: one server bound to one address, mounted into the process runtime as a service, and the outbound client (NewHTTPClient) whose every connection is dialed through a granted socket capability.
|
Package http is the HTTP capability: one server bound to one address, mounted into the process runtime as a service, and the outbound client (NewHTTPClient) whose every connection is dialed through a granted socket capability. |