#[repr(C)]
pub struct ISteamNetworkingSockets { pub vtable_: *const ISteamNetworkingSockets__bindgen_vtable, }
Expand description

Lower level networking API.

  • Connection-oriented API (like TCP, not UDP). When sending and receiving messages, a connection handle is used. (For a UDP-style interface, where the peer is identified by their address with each send/recv call, see ISteamNetworkingMessages.) The typical pattern is for a “server” to “listen” on a “listen socket.” A “client” will “connect” to the server, and the server will “accept” the connection. If you have a symmetric situation where either peer may initiate the connection and server/client roles are not clearly defined, check out k_ESteamNetworkingConfig_SymmetricConnect.
  • But unlike TCP, it’s message-oriented, not stream-oriented.
  • Mix of reliable and unreliable messages
  • Fragmentation and reassembly
  • Supports connectivity over plain UDP
  • Also supports SDR (“Steam Datagram Relay”) connections, which are addressed by the identity of the peer. There is a “P2P” use case and a “hosted dedicated server” use case.

Note that neither of the terms “connection” nor “socket” necessarily correspond one-to-one with an underlying UDP socket. An attempt has been made to keep the semantics as similar to the standard socket model when appropriate, but some deviations do exist.

See also: ISteamNetworkingMessages, the UDP-style interface. This API might be easier to use, especially when porting existing UDP code.

Fields§

§vtable_: *const ISteamNetworkingSockets__bindgen_vtable

Implementations§

source§

impl ISteamNetworkingSockets

source

pub unsafe fn destruct(&mut self)

Trait Implementations§

source§

impl Debug for ISteamNetworkingSockets

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.