Struct trust_dns::tcp::TcpHandler
[−]
[src]
pub struct TcpHandler { /* fields omitted */ }
Methods
impl TcpHandler
[src]
fn new_client_handler(stream: TcpStream) -> Self
initializes this handler with the intention to write first
fn new_server_handler(stream: TcpStream) -> Self
initializes this handler with the intention to read first
fn get_stream(&self) -> &TcpStream
fn get_events(&self) -> EventSet
fn set_buffer(&mut self, buffer: Vec<u8>)
fn remove_buffer(&mut self) -> Vec<u8>
fn get_buffer(&self) -> &[u8]
fn get_buffer_mut(&mut self) -> &mut Vec<u8>
fn handle_message(&mut self, events: EventSet) -> Result<TcpState>
The result may be an error case of ErrorKind::WouldBlock, which means that the handler handler should be put back into the event loop for more processing.
fn reset(&mut self)
resets the state of the handler to perform more requests if desired. clears the buffers and sets the state back to the initial state