pub struct DebugProtocolHandler { /* private fields */ }Expand description
Debug protocol handler managing client connections and command dispatch.
Implementations§
Source§impl DebugProtocolHandler
impl DebugProtocolHandler
Sourcepub fn new(session_registry: DebugSessionRegistry) -> Self
pub fn new(session_registry: DebugSessionRegistry) -> Self
Creates a new protocol handler.
Sourcepub fn session_registry(&self) -> &DebugSessionRegistry
pub fn session_registry(&self) -> &DebugSessionRegistry
Returns a reference to the session registry.
Sourcepub fn session_registry_mut(&mut self) -> &mut DebugSessionRegistry
pub fn session_registry_mut(&mut self) -> &mut DebugSessionRegistry
Returns a mutable reference to the session registry.
Sourcepub fn client_connected(
&mut self,
client_id: String,
sink: Box<dyn ResponseSink>,
)
pub fn client_connected( &mut self, client_id: String, sink: Box<dyn ResponseSink>, )
Registers a new client connection.
Sourcepub fn client_disconnected(&mut self, client_id: &str)
pub fn client_disconnected(&mut self, client_id: &str)
Cleans up when a client disconnects.
Sourcepub fn handle_command(&mut self, client_id: &str, command: DebugCommand)
pub fn handle_command(&mut self, client_id: &str, command: DebugCommand)
Handles a command from a connected client.
Sourcepub fn broadcast_event(&mut self, session_id: &str, event: &NetEvent)
pub fn broadcast_event(&mut self, session_id: &str, event: &NetEvent)
Delivers a live event to all subscribed clients for the given session.
Auto Trait Implementations§
impl Freeze for DebugProtocolHandler
impl !RefUnwindSafe for DebugProtocolHandler
impl Send for DebugProtocolHandler
impl Sync for DebugProtocolHandler
impl Unpin for DebugProtocolHandler
impl UnsafeUnpin for DebugProtocolHandler
impl !UnwindSafe for DebugProtocolHandler
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