pub struct FrontRustls {
pub stream: TcpStream,
pub session: ServerConnection,
pub peer_disconnected: bool,
pub peer_reset: bool,
pub session_ulid: Ulid,
}Fields§
§stream: TcpStream§session: ServerConnection§peer_disconnected: boolPeer sent a graceful FIN on the read side (read() returned Ok(0)).
We can no longer receive plaintext, but may still have rustls-buffered
records to flush on the write side — do NOT abort pending writes.
peer_reset: boolPeer reset the connection (RST/ConnectionAborted/BrokenPipe). The TCP channel is dead; further writes are pointless and should short-circuit.
session_ulid: UlidConnection/session ULID propagated from the enclosing mux session.
Rendered into SOCKET-layer error logs via Self::session_ulid.
Trait Implementations§
Source§impl Debug for FrontRustls
impl Debug for FrontRustls
Source§impl SocketHandler for FrontRustls
impl SocketHandler for FrontRustls
Source§fn socket_write(&mut self, buf: &[u8]) -> (usize, SocketResult)
fn socket_write(&mut self, buf: &[u8]) -> (usize, SocketResult)
Keep these two functions structurally symmetric — a divergence
caused the 4.5 MB H2 truncation bug. Tests
e2e::tests::h2_correctness_tests::* and
e2e::tests::h2_tests::test_h2_large_* are the regression guard.
Source§fn socket_write_vectored(
&mut self,
bufs: &[IoSlice<'_>],
) -> (usize, SocketResult)
fn socket_write_vectored( &mut self, bufs: &[IoSlice<'_>], ) -> (usize, SocketResult)
Write a list of plaintext slices through the rustls session.
Empty-buffer invariant: callers may legitimately pass bufs.is_empty()
or an all-empty slice to request a pure flush pass. In that case
total_len == 0, the top-of-loop buffered_size == total_len guard
fires immediately after write_tls drains any pending TLS records the
session still has buffered (e.g. the remainder of a record split by
the previous call, or close_notify output). This mirrors
Self::socket_write: both entry points must stay structurally
symmetric so that a zero-byte flush never early-returns without giving
rustls a chance to emit bytes.
Keep these two functions structurally symmetric — a divergence
caused the 4.5 MB H2 truncation bug. Tests
e2e::tests::h2_correctness_tests::* and
e2e::tests::h2_tests::test_h2_large_* are the regression guard.
fn socket_read(&mut self, buf: &mut [u8]) -> (usize, SocketResult)
fn socket_close(&mut self)
fn socket_wants_write(&self) -> bool
fn socket_ref(&self) -> &TcpStream
fn socket_mut(&mut self) -> &mut TcpStream
fn protocol(&self) -> TransportProtocol
fn read_error(&self)
fn write_error(&self)
Source§fn session_ulid(&self) -> Option<Ulid>
fn session_ulid(&self) -> Option<Ulid>
log_socket_context!] to render the [<session_ulid> - - -] segment
of the socket-layer log prefix, matching the format used by the
rest of the mux stack. Returns None for contextless implementations
(e.g. raw mio::TcpStream); the macro renders - in the ULID slot.