Event-based web sockets