Skip to main content

greet

Function greet 

Source
async fn greet<S>(
    socket: S,
    state: Arc<TransportState>,
    peer: SocketAddr,
    deflate: bool,
)
where S: Stream<Item = Result<Message, Error>> + Sink<Message, Error = Error> + Unpin + Send,
Expand description

Greet, then serve the client until it goes.

The greeting is what tells a client it is speaking to a forge rather than to whatever else holds the port, and it carries the settings the client draws with - so the client is configured before it draws anything rather than discovering a theme later.