working websocket implementation, see examples/test_ws.c