Lurker News

Comments (140) 32 threads

Earlier comments
cypher5431 reply#
> "Write programs that do one thing and do it well."

So why does this WebSocket daemon also serve static files and CGI applications?

spoiler1 reply#
Because you need to implement a tiny HTTP server for WebSockets anyway (if you want't them to work from browsers). So, adding the ability to serve static files on top of that is trivial.

Not sure why they added CGI, though.

joewalnes#
That indeed was a dilemma. Although it focusses on doing one thing well, there were also a few core things that are useful to support a websocket based app - namely a place to serve the actual web content from (static) and the ability to use websocketd using vanilla http instead of websockets (cgi).
tomerbd1 reply#
beautiful website may I ask with which template / framework it was written? (is it in github by any chance?)
nichochar#
Holy shit that's cool
kalmi101 reply#
How are message boundaries handled?

WebSockets are message-based. UNIX streams are not.

joewalnes#
websocketd treats each line as a message. i.e. boundaries are marked with \n

Load more comments