pub struct RaknetServer { /* private fields */ }Implementations§
Source§impl RaknetServer
impl RaknetServer
pub fn builder() -> RaknetServerBuilder
pub async fn bind(bind_addr: SocketAddr) -> Result<Self>
pub fn facade(&mut self) -> ServerFacade<'_>
pub fn event_facade<'a, H: EventFacadeHandler>( &'a mut self, handler: &'a mut H, ) -> EventFacade<'a, H>
pub fn session_facade<'a, H: SessionFacadeHandler>( &'a mut self, handler: &'a mut H, ) -> SessionFacade<'a, H>
pub async fn start_with_configs( transport_config: TransportConfig, runtime_config: ShardedRuntimeConfig, ) -> Result<Self>
pub fn peer_addr(&self, peer_id: PeerId) -> Option<SocketAddr>
pub fn peer_shard(&self, peer_id: PeerId) -> Option<usize>
pub fn peer_id_for_addr(&self, addr: SocketAddr) -> Option<PeerId>
pub async fn send( &self, peer_id: PeerId, payload: impl Into<Bytes>, ) -> Result<()>
pub async fn send_with_options( &self, peer_id: PeerId, payload: impl Into<Bytes>, options: SendOptions, ) -> Result<()>
pub async fn send_with_receipt( &self, peer_id: PeerId, payload: impl Into<Bytes>, receipt_id: u64, ) -> Result<()>
pub async fn send_with_options_and_receipt( &self, peer_id: PeerId, payload: impl Into<Bytes>, options: SendOptions, receipt_id: u64, ) -> Result<()>
pub async fn disconnect(&mut self, peer_id: PeerId) -> Result<()>
pub async fn next_event(&mut self) -> Option<RaknetServerEvent>
pub async fn shutdown(self) -> Result<()>
Auto Trait Implementations§
impl Freeze for RaknetServer
impl !RefUnwindSafe for RaknetServer
impl Send for RaknetServer
impl Sync for RaknetServer
impl Unpin for RaknetServer
impl UnsafeUnpin for RaknetServer
impl UnwindSafe for RaknetServer
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