Implement fileno() on WebSocket

Allows you to pass websocket into, eg select.select()
This commit is contained in:
Richo Healey
2013-05-20 16:48:17 +10:00
parent cb8a7f694f
commit 91ac73c606

View File

@@ -364,6 +364,9 @@ class WebSocket(object):
self.sock.setsockopt(*opts)
self.get_mask_key = get_mask_key
def fileno(self):
return self.io_sock.fileno()
def set_mask_key(self, func):
"""
set function to create musk key. You can custumize mask key generator.