fix websocket frame encoding bugs and support binary protocol