Struct tlspuffin::tcp::TcpClientPut
source · pub struct TcpClientPut {
stream: TcpStream,
agent_descriptor: AgentDescriptor,
process: Option<TLSProcess>,
}
Expand description
A PUT which is backed by a TCP stream to a server. In order to use this start an OpenSSL server like this:
openssl s_server -key key.pem -cert cert.pem -accept 44330 -msg -debug -state
Fields§
§stream: TcpStream
§agent_descriptor: AgentDescriptor
§process: Option<TLSProcess>
Implementations§
source§impl TcpClientPut
impl TcpClientPut
fn new(
agent_descriptor: &AgentDescriptor,
put_descriptor: &PutDescriptor
) -> Result<Self, Error>
fn new_stream<A: ToSocketAddrs>(addr: A) -> Result<TcpStream>
pub fn set_process(&mut self, process: TLSProcess)
Trait Implementations§
source§impl Put<TLSProtocolBehavior> for TcpClientPut
impl Put<TLSProtocolBehavior> for TcpClientPut
source§fn progress(&mut self, _agent_name: &AgentName) -> Result<(), Error>
fn progress(&mut self, _agent_name: &AgentName) -> Result<(), Error>
Process incoming buffer, internal progress, can fill in the output buffer
fn descriptor(&self) -> &AgentDescriptor
source§fn rename_agent(&mut self, _agent_name: AgentName) -> Result<(), Error>
fn rename_agent(&mut self, _agent_name: AgentName) -> Result<(), Error>
Propagate agent changes to the PUT
source§fn describe_state(&self) -> &str
fn describe_state(&self) -> &str
Returns a textual representation of the state in which self is
source§fn is_state_successful(&self) -> bool
fn is_state_successful(&self) -> bool
Checks whether the Put is in a good state
source§fn determinism_reseed(&mut self) -> Result<(), Error>
fn determinism_reseed(&mut self) -> Result<(), Error>
Make the PUT used by self deterministic in the future by making its PRNG “deterministic”
Now subsumed by Factory-level functions to reseed globally:
determinism_reseed
source§fn shutdown(&mut self) -> String
fn shutdown(&mut self) -> String
Shut down the PUT by consuming it and returning a string that summarizes the execution.
source§fn version() -> Stringwhere
Self: Sized,
fn version() -> Stringwhere
Self: Sized,
Returns a textual representation of the version of the PUT used by self
source§fn is_reusable_with(&self, other: &AgentDescriptor) -> bool
fn is_reusable_with(&self, other: &AgentDescriptor) -> bool
checks whether a agent is reusable with the descriptor
source§impl Stream<TlsQueryMatcher, Message, OpaqueMessage, OpaqueMessageFlight> for TcpClientPut
impl Stream<TlsQueryMatcher, Message, OpaqueMessage, OpaqueMessageFlight> for TcpClientPut
fn add_to_inbound(&mut self, opaque_flight: &OpaqueMessageFlight)
source§fn take_message_from_outbound(
&mut self
) -> Result<Option<OpaqueMessageFlight>, Error>
fn take_message_from_outbound(
&mut self
) -> Result<Option<OpaqueMessageFlight>, Error>
Takes a single TLS message from the outbound channel
source§impl TcpPut for TcpClientPut
impl TcpPut for TcpClientPut
fn write_to_stream(&mut self, buf: &[u8]) -> Result<()>
fn read_to_flight(&mut self) -> Result<Option<OpaqueMessageFlight>, Error>
Auto Trait Implementations§
impl RefUnwindSafe for TcpClientPut
impl Send for TcpClientPut
impl Sync for TcpClientPut
impl Unpin for TcpClientPut
impl UnwindSafe for TcpClientPut
Blanket Implementations§
§impl<Tail, T> Prepend<T> for Tail
impl<Tail, T> Prepend<T> for Tail
§type PreprendResult = Tail
type PreprendResult = Tail
The Resulting [
TupleList
], of an [Prepend::prepend()
] call,
including the prepended entry.