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, options: &PutOptions, ) -> 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) -> Result<(), Error>
fn progress(&mut self) -> Result<(), Error>
Process incoming buffer, internal progress, can fill in the output buffer
fn descriptor(&self) -> &AgentDescriptor
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§impl Stream<TLSProtocolBehavior> for TcpClientPut
impl Stream<TLSProtocolBehavior> 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 Freeze for TcpClientPut
impl RefUnwindSafe for TcpClientPut
impl Send for TcpClientPut
impl Sync for TcpClientPut
impl Unpin for TcpClientPut
impl UnwindSafe for TcpClientPut
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§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.