pub struct SplitConnection<Side: SideData> {
pub send: SendTraffic,
pub receive: ReceiveTraffic<Side>,
pub outputs: ConnectionOutputs,
}Expand description
A post-handshake connection which has been split by direction.
Typically you will immediately destructure this type, and give the components to different threads/handlers to progress separately.
Fields§
§send: SendTrafficThe ability to encrypt data to be sent.
receive: ReceiveTraffic<Side>The ability to decrypt received data.
outputs: ConnectionOutputsFacts about the connection established during the handshake.
Implementations§
Source§impl<Side: SideData> SplitConnection<Side>
impl<Side: SideData> SplitConnection<Side>
Sourcepub fn dangerous_into_kernel_connection(
self,
) -> Result<(ExtractedSecrets, KernelConnection<Side>), Error>
pub fn dangerous_into_kernel_connection( self, ) -> Result<(ExtractedSecrets, KernelConnection<Side>), Error>
Extract secrets and a KernelConnection, so they can be used when
configuring kTLS, for example.
Should be used with care as it exposes secret key material.
The returned KernelConnection continues to own the connection’s
secrets, so it can compute new traffic secrets on key update and (for
client connections) accept session tickets. See the kernel module
documentation for the details.
This fails if the connection was not made with enable_secret_extraction set.