add websocket api
Merge pull request #43 from michaelfung/master

add websocket api