On Mon, 15 Oct 2012 08:53:43 +0200, Sönke Ludwig wrote:

On Sun, 14 Oct 2012 22:45:22 +0200, Eldar Insafutdinov wrote:

I found that there is a module in vibe to handle Websockets upgrade request and perform handshaking.
However I don't really understand how to then listen for incoming data on the websocket:
vibe.http.websockets.Websocket class doesn't provide any interface for that. Is it still a work in progress?

Also looking at the sources of libevent driver I am wondering - won't websocket be closed immediately after
handling of incoming request: https://github.com/rejectedsoftware/vibe.d/blob/master/source/vibe/core/drivers/libevent2_tcp.d#L373?

The vibenotes project contains a usage example of WebSockets in its broadcast module. It doesn't seem work as it should though. I'll notify Jan, who did the WebSocket implementation.

Thanks, that's exactly what I needed. I guess I am more used to the callback model of NodeJS where here it is just a loop. I'll have a look at the example.