Adds a client and their connection start time to the tracking dictionaries. Args: websocket: The websocket associated with the client to add. client: The client object to be added and tracked.
(self, websocket, client)
| 46 | self.lock = threading.Lock() |
| 47 | |
| 48 | def add_client(self, websocket, client): |
| 49 | """ |
| 50 | Adds a client and their connection start time to the tracking dictionaries. |
| 51 | |
| 52 | Args: |
| 53 | websocket: The websocket associated with the client to add. |
| 54 | client: The client object to be added and tracked. |
| 55 | """ |
| 56 | with self.lock: |
| 57 | self.clients[websocket] = client |
| 58 | self.start_times[websocket] = time.time() |
| 59 | |
| 60 | def get_client(self, websocket): |
| 61 | """ |
no outgoing calls