Wire controller messages through new modules (background tasks, runtime state, startup) and add binary envelope handling. Co-authored-by: Cursor <cursoragent@cursor.com>
13 lines
336 B
Python
13 lines
336 B
Python
class RuntimeState:
|
|
def __init__(self):
|
|
self.hello = True
|
|
self.ws_client_count = 0
|
|
|
|
def ws_connected(self):
|
|
self.ws_client_count += 1
|
|
self.hello = False
|
|
|
|
def ws_disconnected(self):
|
|
self.ws_client_count = max(0, self.ws_client_count - 1)
|
|
self.hello = self.ws_client_count == 0
|