mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-01 02:05:30 +00:00
aquatic_http: add Connection methods, enabling making 'inner' private
This commit is contained in:
parent
1ea1f0b749
commit
c28e764929
2 changed files with 28 additions and 8 deletions
|
|
@ -252,18 +252,18 @@ pub fn run_handshakes_and_read_requests(
|
|||
{
|
||||
match handshake_machine.establish_tls(){
|
||||
Ok(established) => {
|
||||
let connection = Connection {
|
||||
let connection = Connection::from_established(
|
||||
valid_until,
|
||||
inner: ConnectionInner::Established(established)
|
||||
};
|
||||
established
|
||||
);
|
||||
|
||||
connections.insert(poll_token, connection);
|
||||
},
|
||||
Err(TlsHandshakeMachineError::WouldBlock(machine)) => {
|
||||
let connection = Connection {
|
||||
let connection = Connection::from_in_progress(
|
||||
valid_until,
|
||||
inner: ConnectionInner::InProgress(machine)
|
||||
};
|
||||
machine
|
||||
);
|
||||
|
||||
connections.insert(poll_token, connection);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue