add clone method in websocket

pull/106/head
Ciro 2023-01-19 15:56:43 -03:00
rodzic df53e84351
commit b18d2960a3
1 zmienionych plików z 5 dodań i 0 usunięć

Wyświetl plik

@ -1143,6 +1143,11 @@ class WebSocket:
self.socket_data = None
self.got_socket_data = False
def clone(self):
# clone and preserve this websocket in another instance
return WebSocket(self.websocket, self.app)
def trigger_for_each_topic_handler(self, topic):
if hasattr(self, "_for_each_topic_handler") and hasattr(
self._for_each_topic_handler, "__call__"