Skip to content

blackbull.server.websocket_actor

blackbull.server.websocket_actor

WebSocket Actor — Phase 6 Step 5.

WebSocketActor

Bases: Actor

Owns one WebSocket connection after the HTTP upgrade handshake.

FragmentAssembler runs inside WebSocketRecipient; the ASGI app always receives complete messages.

Supervisor strategy: isolate — exceptions from the app or protocol call on_error; on_websocket_disconnected always fires in finally.

websocket_connected fires after the app sends websocket.accept (matching the ASGI semantic: the connection is "established" from the app's view). websocket_disconnected fires in finally with the last disconnect code seen.