pub struct LoginServer {
    peer_id_receiver: Receiver<(PeerIdentifier, [u8; 32])>,
}
Expand description

Wrapper for a TcpListener that accepts new clients and gives them the needed bits of information to talk to GameplaySocket.

Fields

peer_id_receiver: Receiver<(PeerIdentifier, [u8; 32])>

Implementations

Creates the TCP listener, and spawns a thread that will spawn another new thread for each incoming connection, one for each client.

Each client that succesfully finishes the TLS handshake gets a PeerIdentifier and an encryption key to pass to MessageOrderer::new.

Returns any new peer-identifier-and-encryption-key-pairs that have been generated for new clients. Should be called until None is returned, like an iterator.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.