Struct naia_shared::Protocol
source · pub struct Protocol {
pub channel_kinds: ChannelKinds,
pub message_kinds: MessageKinds,
pub component_kinds: ComponentKinds,
pub socket: SocketConfig,
pub tick_interval: Duration,
pub compression: Option<CompressionConfig>,
pub client_authoritative_entities: bool,
/* private fields */
}
Fields§
§channel_kinds: ChannelKinds
§message_kinds: MessageKinds
§component_kinds: ComponentKinds
§socket: SocketConfig
Used to configure the underlying socket
tick_interval: Duration
The duration between each tick
compression: Option<CompressionConfig>
Configuration used to control compression parameters
Whether or not Client Authoritative Entities will be allowed
Implementations§
source§impl Protocol
impl Protocol
pub fn builder() -> Self
pub fn add_plugin<P: ProtocolPlugin>(&mut self, plugin: P) -> &mut Self
pub fn link_condition(&mut self, config: LinkConditionerConfig) -> &mut Self
pub fn rtc_endpoint(&mut self, path: String) -> &mut Self
pub fn tick_interval(&mut self, duration: Duration) -> &mut Self
pub fn compression(&mut self, config: CompressionConfig) -> &mut Self
pub fn add_default_channels(&mut self) -> &mut Self
pub fn add_channel<C: Channel>( &mut self, direction: ChannelDirection, mode: ChannelMode ) -> &mut Self
pub fn add_message<M: Message>(&mut self) -> &mut Self
pub fn add_component<C: Replicate>(&mut self) -> &mut Self
pub fn lock(&mut self)
pub fn check_lock(&self)
pub fn build(&mut self) -> Self
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Protocol
impl Send for Protocol
impl Sync for Protocol
impl Unpin for Protocol
impl !UnwindSafe for Protocol
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