A struct representing the two halves of the WebSocket handshake.
The HTTP request sent to begin the handshake.
The HTTP response from the server confirming the handshake.
The socket address of the other endpoint. This address may
be an intermediary such as a proxy server.
The socket address of this endpoint.
Get the IP address of the remote connection.
This is the preferred method of obtaining the client's IP address.
It will attempt to retrieve the most likely IP address based on request
headers, falling back to the address of the peer.
This assumes that the peer is a client. If you are implementing a
WebSocket client and want to obtain the address of the server, use
Handshake::peer_addr
instead.
This method does not ensure that the address is a valid IP address.
Formats the value using the given formatter. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static