Endpoint
An iroh endpoint.
Bind one with `Endpoint::bind`. Provide protocol handlers via `EndpointOptions::protocols` to dispatch incoming connections.
Functions
Pull the next incoming connection attempt from the accept queue.
Add an external (manually-known) socket address that this endpoint is reachable on. Useful when running behind a static NAT / load balancer.
The `EndpointAddr` for this endpoint (id + currently known addresses).
The local socket addresses this endpoint is bound to.
Connect to a remote endpoint via the given ALPN.
Begin a connection attempt to addr for alpn, returning the in-progress `Connecting` state.
The `EndpointId` of this endpoint.
Insert (or replace) a relay configuration at runtime.
Look up cached information about a remote endpoint, if any.
Remove a previously-added external address. Returns true if an entry was removed.
Remove a relay configuration at runtime. Returns true if a relay was removed.
Get current statistics for this endpoint.
Register a callback that fires whenever the endpoint's `EndpointAddr` changes (relay home rotates, IP discovered, etc.). The returned `WatchHandle` cancels the watcher when dropped or when its stop() method is called.
Register a callback that fires whenever the list of relays this endpoint is currently connected to changes.
Register a callback that fires every time the underlying network stack reports a change (interface up/down, NAT change, roaming, etc.).