Thanks for your great work! I've added asyncore classes to your module as I needed these. This makes it very easy to integrate this websocket server into existing applications that are based on asyncore (i.e. yowsup)
You can use them as follows:
import asyncore
from SimpleWebSocketServer import AsyncoreWebSocketServer, AsyncoreWebSocketServerHandler
class SimpleAsyncoreEcho(AsyncoreWebSocketServerHandler):
def handleMessage(self):
self.sendMessage(self.data)
def handleConnected(self):
print('New client connected')
def handleClose(self):
pass
if __name__ == '__main__':
server = AsyncoreWebSocketServer("", 8000, SimpleAsyncoreEcho)
asyncore.loop()
Thanks for your great work! I've added asyncore classes to your module as I needed these. This makes it very easy to integrate this websocket server into existing applications that are based on asyncore (i.e. yowsup)
You can use them as follows: