Skip to content

Instantly share code, notes, and snippets.

@atinsood
atinsood / websocketClientBolt.py
Created March 15, 2013 15:39
Storm bolt to send messages to websockets
import storm
from storm import log
from websocket import create_connection
try:
import simplejson as json
except ImportError:
import json
json_decode = lambda x: json.loads(x)
@atinsood
atinsood / tornadoWebsocketClient.py
Created March 15, 2013 04:42
Basic websocket server and client implemented in python using tornado....
import websocket
import thread
import time
def on_message(ws, message):
print message
def on_error(ws, error):
print error