pub struct Inbound {
pub discovery: Arc<dyn Discovery>,
pub listen: SocketAddr,
pub path: String,
}Expand description
The server-initiated half of the connection mode.
Setting ClientConfig::inbound puts the client in this mode: advertise publishes
CLIENT_SERVICE_TYPE with the bound port, the configured path
and the player name, and then accepts the servers that connect. A manual
connect is refused while this is set, because connection.md lets a
client use one of the two methods at a time.
Fields§
§discovery: Arc<dyn Discovery>Backend that publishes the record and browses for servers.
listen: SocketAddrAddress the listener binds.
path: StringWebSocket path the listener serves, as the path TXT record states it.
Implementations§
Source§impl Inbound
impl Inbound
Sourcepub fn new(discovery: Arc<dyn Discovery>) -> Inbound
pub fn new(discovery: Arc<dyn Discovery>) -> Inbound
Returns the server-initiated mode for discovery, with the spec’s defaults.
The listener binds DEFAULT_INBOUND_ADDR - every interface on
DEFAULT_INBOUND_PORT - and serves /sendspin. A host that narrows the address or
moves the path sets the fields before placing the value in ClientConfig::inbound.