Base code for websocket sample application