Struct micro_http_async::Connection
source ·
[−]pub struct Connection { /* fields omitted */ }
Expand description
Connection
This struct is a helpful struct to handle the nitty gritty of connections, such as reading and writing to the stream
Implementations
New
Create a new connection handler from a TcpStream
Read To String
Read the TcpStream
to a String
Write String
Write a String
value to the TcpStream
. Returns a Result
as we cannot guarantee a successful write.
Write Bytes
Write bytes to the TCP stream, useful for sending data for things such as images or downloadable binary files