sharpie.webserver.experiment.websocket

Classes

RunConsumer(*args, **kwargs)

WebSocket consumer for experiment execution.

class sharpie.webserver.experiment.websocket.RunConsumer(*args, **kwargs)

WebSocket consumer for experiment execution.

Handles communication between participants, runners, and the experiment. Participants send actions; runners broadcast state updates.

async verify_runner()

Verify if the connection is from an authenticated runner.

async connect()

Handle WebSocket connection.

async websocket_message(event)

Forward WebSocket message to client.

async receive(text_data=None)

Handle incoming WebSocket message.

async disconnect(close_code)

Handle WebSocket disconnection.