[−][src]Struct victorem::ClientSocket
Client used to communicate with GameServer
. Must be singleton in your app.
Methods
impl ClientSocket
[src]
impl ClientSocket
pub fn new( | [src] |
Create new client and listen on port to recv packets from server_address and send its to them.
pub fn send(&mut self, command: Vec<u8>) -> Result<usize, Exception> | [src] |
Send data to server Don't block current thread may wait up to 30 milliseconds if you send commands too often Commands ordered and with some guarantees.
pub fn recv(&mut self) -> Result<Vec<u8>, Exception> | [src] |
Reads data from server.
Don't block current thread.
Return Exception
with std::io::ErrorKind::WouldBlock
if there is no data available.
Data ordered and without some guarantees.
Auto Trait Implementations
impl Send for ClientSocket
impl Send for ClientSocket
impl Sync for ClientSocket
impl Sync for ClientSocket
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error> | [src] |
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T | [src] |
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error> | [src] |
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId | [src] |