[][src]Trait breadx::display::Connection

pub trait Connection {
    pub fn send_packet(&mut self, bytes: &[u8]) -> Result;
pub fn read_packet(&mut self, bytes: &mut [u8]) -> Result; }

A trait that represents the ability to send and receive bytes across a connection. This is used as a two-way stream to send and receive data from the X server.

Required methods

pub fn send_packet(&mut self, bytes: &[u8]) -> Result[src]

Send bytes in a packet across the connection in a blocking manner.

pub fn read_packet(&mut self, bytes: &mut [u8]) -> Result[src]

Read a packet/request from the connection in a blocking manner.

Loading content...

Implementations on Foreign Types

impl Connection for TcpStream[src]

impl Connection for UnixStream[src]

Loading content...

Implementors

impl Connection for NameConnection[src]

Loading content...