pub struct RealtimeCore {
pub sessions: Arc<SessionRegistry>,
pub presence: Arc<Presence>,
}Fields§
§sessions: Arc<SessionRegistry>§presence: Arc<Presence>Implementations§
Source§impl RealtimeCore
impl RealtimeCore
Sourcepub fn new() -> RealtimeCore
pub fn new() -> RealtimeCore
Create a new realtime core with fresh registries.
Sourcepub fn best_effort_shutdown_all(&self, reason: &str)
pub fn best_effort_shutdown_all(&self, reason: &str)
Send Close frames to all sessions during draining (best-effort).
pub fn send_to_user( &self, user_key: &str, out: Outgoing, ) -> Result<(), WsPrismError>
Sourcepub fn send_to_session(
&self,
session_key: &str,
out: Outgoing,
) -> Result<(), WsPrismError>
pub fn send_to_session( &self, session_key: &str, out: Outgoing, ) -> Result<(), WsPrismError>
Send to a single session. Queue-full drops are sampled and logged.
pub fn publish_room_lossy( &self, room_key: &str, out: Outgoing, ) -> Result<(), WsPrismError>
pub async fn publish_room_reliable( &self, room_key: &str, out: Outgoing, ) -> Result<(), WsPrismError>
Auto Trait Implementations§
impl Freeze for RealtimeCore
impl !RefUnwindSafe for RealtimeCore
impl Send for RealtimeCore
impl Sync for RealtimeCore
impl Unpin for RealtimeCore
impl !UnwindSafe for RealtimeCore
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