pub struct TachyonSocket {
pub address: NetworkAddress,
pub is_server: bool,
pub socket: Option<UdpSocket>,
pub rng: StdRng,
pub test_mode: bool,
pub test_sequence: u16,
}Fields§
§address: NetworkAddress§is_server: bool§socket: Option<UdpSocket>§rng: StdRng§test_mode: bool§test_sequence: u16Implementations§
Source§impl TachyonSocket
impl TachyonSocket
pub fn create() -> Self
pub fn clone_socket(&self) -> Option<UdpSocket>
pub fn bind_socket(&mut self, naddress: NetworkAddress) -> CreateConnectResult
pub fn connect_socket( &mut self, naddress: NetworkAddress, ) -> CreateConnectResult
pub fn receive( &mut self, data: &mut [u8], drop_chance: u64, drop_reliable_only: bool, ) -> SocketReceiveResult
pub fn send_to( &self, address: NetworkAddress, data: &[u8], length: usize, ) -> usize
Auto Trait Implementations§
impl Freeze for TachyonSocket
impl RefUnwindSafe for TachyonSocket
impl Send for TachyonSocket
impl Sync for TachyonSocket
impl Unpin for TachyonSocket
impl UnwindSafe for TachyonSocket
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more