Support websocket

Sorry for the commit, just need it very quickly.
This fix #2. 
I'll improve the code later.