[−][src]Struct gdnative_bindings::WebSocketMultiplayerPeer
core class WebSocketMultiplayerPeer
inherits NetworkedMultiplayerPeer
(reference counted).
Official documentation
See the documentation of this class in the Godot engine's official documentation.
Memory management
The lifetime of this object is automatically managed through reference counting.
Class hierarchy
WebSocketMultiplayerPeer inherits methods from:
Safety
All types in the Godot API have "interior mutability" in Rust parlance.
To enforce that the official thread-safety guidelines are
followed, the typestate pattern is used in the Ref
and TRef
smart pointers,
and the Instance
API. The typestate Access
in these types tracks whether the
access is unique, shared, or exclusive to the current thread. For more information,
see the type-level documentation on Ref
.
Implementations
impl WebSocketMultiplayerPeer
[src]
pub fn get_peer(&self, peer_id: i64) -> Option<Ref<WebSocketPeer, Shared>>
[src]
pub fn set_buffers(
&self,
input_buffer_size_kb: i64,
input_max_packets: i64,
output_buffer_size_kb: i64,
output_max_packets: i64
) -> GodotResult
[src]
&self,
input_buffer_size_kb: i64,
input_max_packets: i64,
output_buffer_size_kb: i64,
output_max_packets: i64
) -> GodotResult
Methods from Deref<Target = NetworkedMultiplayerPeer>
pub const CONNECTION_CONNECTED: i64
[src]
pub const CONNECTION_CONNECTING: i64
[src]
pub const CONNECTION_DISCONNECTED: i64
[src]
pub const TARGET_PEER_BROADCAST: i64
[src]
pub const TARGET_PEER_SERVER: i64
[src]
pub const TRANSFER_MODE_RELIABLE: i64
[src]
pub const TRANSFER_MODE_UNRELIABLE: i64
[src]
pub const TRANSFER_MODE_UNRELIABLE_ORDERED: i64
[src]
pub fn get_connection_status(&self) -> ConnectionStatus
[src]
Returns the current state of the connection. See [enum ConnectionStatus].
pub fn get_packet_peer(&self) -> i64
[src]
Returns the ID of the [NetworkedMultiplayerPeer] who sent the most recent packet.
pub fn transfer_mode(&self) -> TransferMode
[src]
The manner in which to send packets to the [code]target_peer[/code]. See [enum TransferMode].
pub fn get_unique_id(&self) -> i64
[src]
Returns the ID of this [NetworkedMultiplayerPeer].
pub fn is_refusing_new_connections(&self) -> bool
[src]
If [code]true[/code], this [NetworkedMultiplayerPeer] refuses new connections.
pub fn poll(&self)
[src]
Waits up to 1 second to receive a new network event.
pub fn set_refuse_new_connections(&self, enable: bool)
[src]
If [code]true[/code], this [NetworkedMultiplayerPeer] refuses new connections.
pub fn set_target_peer(&self, id: i64)
[src]
Sets the peer to which packets will be sent.
The [code]id[/code] can be one of: [constant TARGET_PEER_BROADCAST] to send to all connected peers, [constant TARGET_PEER_SERVER] to send to the peer acting as server, a valid peer ID to send to that specific peer, a negative peer ID to send to all peers except that one. By default, the target peer is [constant TARGET_PEER_BROADCAST].
pub fn set_transfer_mode(&self, mode: i64)
[src]
The manner in which to send packets to the [code]target_peer[/code]. See [enum TransferMode].
Trait Implementations
impl Debug for WebSocketMultiplayerPeer
[src]
impl Deref for WebSocketMultiplayerPeer
[src]
type Target = NetworkedMultiplayerPeer
The resulting type after dereferencing.
fn deref(&self) -> &NetworkedMultiplayerPeer
[src]
impl DerefMut for WebSocketMultiplayerPeer
[src]
fn deref_mut(&mut self) -> &mut NetworkedMultiplayerPeer
[src]
impl GodotObject for WebSocketMultiplayerPeer
[src]
type RefKind = RefCounted
The memory management kind of this type. This modifies the behavior of the
Ref
smart pointer. See its type-level documentation for more
information. Read more
fn class_name() -> &'static str
[src]
fn null() -> Null<Self>
[src]
fn new() -> Ref<Self, Unique> where
Self: Instanciable,
[src]
Self: Instanciable,
fn cast<T>(&self) -> Option<&T> where
T: GodotObject + SubClass<Self>,
[src]
T: GodotObject + SubClass<Self>,
fn upcast<T>(&self) -> &T where
Self: SubClass<T>,
T: GodotObject,
[src]
Self: SubClass<T>,
T: GodotObject,
unsafe fn assume_shared(&self) -> Ref<Self, Shared>
[src]
unsafe fn assume_thread_local(&self) -> Ref<Self, ThreadLocal> where
Self: GodotObject<RefKind = RefCounted>,
[src]
Self: GodotObject<RefKind = RefCounted>,
unsafe fn assume_unique(&self) -> Ref<Self, Unique>
[src]
impl Sealed for WebSocketMultiplayerPeer
[src]
impl SubClass<NetworkedMultiplayerPeer> for WebSocketMultiplayerPeer
[src]
impl SubClass<Object> for WebSocketMultiplayerPeer
[src]
impl SubClass<PacketPeer> for WebSocketMultiplayerPeer
[src]
impl SubClass<Reference> for WebSocketMultiplayerPeer
[src]
impl SubClass<WebSocketMultiplayerPeer> for WebSocketServer
[src]
impl SubClass<WebSocketMultiplayerPeer> for WebSocketClient
[src]
Auto Trait Implementations
impl RefUnwindSafe for WebSocketMultiplayerPeer
impl !Send for WebSocketMultiplayerPeer
impl !Sync for WebSocketMultiplayerPeer
impl Unpin for WebSocketMultiplayerPeer
impl UnwindSafe for WebSocketMultiplayerPeer
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SubClass<T> for T where
T: GodotObject,
[src]
T: GodotObject,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
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, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,