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

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.