WebSockets state-machine based protocol implementation
