[][src]Trait oxygengine_network::client::Client

pub trait Client: Send + Sync + Sized {
    fn open(url: &str) -> Option<Self>;
fn close(self) -> Self;
fn id(&self) -> ClientID;
fn state(&self) -> ClientState;
fn send(&mut self, id: MessageID, data: &[u8]) -> Option<Range<usize>>;
fn read(&mut self) -> Option<(MessageID, Vec<u8>)>; fn read_all(&mut self) -> Vec<(MessageID, Vec<u8>)> { ... }
fn process(&mut self) { ... } }

Required methods

fn open(url: &str) -> Option<Self>

fn close(self) -> Self

fn id(&self) -> ClientID

fn state(&self) -> ClientState

fn send(&mut self, id: MessageID, data: &[u8]) -> Option<Range<usize>>

fn read(&mut self) -> Option<(MessageID, Vec<u8>)>

Loading content...

Provided methods

fn read_all(&mut self) -> Vec<(MessageID, Vec<u8>)>

fn process(&mut self)

Loading content...

Implementations on Foreign Types

impl Client for ()[src]

Loading content...

Implementors

Loading content...