mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-03-31 17:55:36 +00:00
aquatic_ws network connection: improve documentation
This commit is contained in:
parent
8dcf3e106c
commit
be18fb2655
1 changed files with 8 additions and 0 deletions
|
|
@ -199,6 +199,14 @@ pub struct Connection {
|
|||
|
||||
/// Create from TcpStream. Run `advance_handshakes` until `get_established_ws`
|
||||
/// returns Some(EstablishedWs).
|
||||
///
|
||||
/// advance_handshakes takes ownership of self because the TLS and WebSocket
|
||||
/// handshake methods do. get_established_ws doesn't, since work can be done
|
||||
/// on a mutable reference to a tungstenite websocket, and this way, the whole
|
||||
/// Connection doesn't have to be removed from and reinserted into the
|
||||
/// TorrentMap. This is also the reason for wrapping Container.inner in an
|
||||
/// Either instead of combining all states into one structure just having a
|
||||
/// single method for advancing handshakes and maybe returning a websocket.
|
||||
impl Connection {
|
||||
#[inline]
|
||||
pub fn new(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue