Commit 4bf57b19 authored by Sam Rushing's avatar Sam Rushing

websocket.handle_close(): notify user when the channel has closed

parent 082de53d
......@@ -144,6 +144,7 @@ class websocket:
if close_it:
break
finally:
self.handle_close()
self.conn.close()
def read_packet (self):
......@@ -232,6 +233,10 @@ class websocket:
# abstract method, override to implement your own logic
return False
def handle_close (self):
# abstract method
pass
def send_text (self, data, fin=True):
return self.send_packet (0x01, data, fin)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment