Fix build
Improve by-default WebSocket detection, improve sample