package relayclient

Import Path
	github.com/tmc/go-iroh/internal/relayclient (on go.dev)

Dependency Relation
	imports 13 packages, and imported by one package

Involved Source Files Package relayclient implements the client side of an iroh relay connection. A client dials a relay server over a secure WebSocket (standard WebPKI TLS, wire-compatible with iroh), negotiates the relay protocol version, completes the authentication handshake, and then exchanges relay frames ([relayproto.ClientToRelayMsg] / [relayproto.RelayToClientMsg]). It is a port of the client side of iroh-relay/src/client. dial_options.go
Package-Level Type Names (total 2)
/* sort by: | */
Client is a connected relay client. It is not safe for concurrent use by multiple senders or multiple receivers; use one goroutine for Send and one for Recv. Close closes the relay connection. Recv receives the next relay-to-client message. Send sends a client-to-relay message. Version returns the negotiated relay protocol version. *Client : github.com/prometheus/common/expfmt.Closer *Client : io.Closer func Connect(ctx context.Context, u netaddr.RelayURL, opts Options) (*Client, error)
Options configures a relay client dial. AuthToken, if set, is sent as a Bearer token in the Authorization header. HTTPClient overrides the HTTP client used for the WebSocket dial. SecretKey is the client's secret key, used for the authentication handshake. Required. TLSConfig overrides the TLS configuration used for the WSS connection. If nil, the default WebPKI verification is used. func Connect(ctx context.Context, u netaddr.RelayURL, opts Options) (*Client, error)
Package-Level Functions (only one)
Connect dials the relay at u and completes the protocol handshake.
Package-Level Variables (total 2)
Errors returned when connecting to a relay.
Errors returned when connecting to a relay.