I wanted to add WebSocket support in a node.js backend for a game I develop. This project has zero dependency outside node.js itself and I was reluctant to add any dependency for this, so I implemented WebSockets myself, with the help of a few example code and documentation from MDN. It does not handle the edge cases (that I don't need), but it's quite straightforward and I'm far from having Daniel's expertise in this kind of stuff.
I trust him to implement WebSockets correctly, it's way easier than most things he probably had to handle in curl.
It's good he went for a solution that does not bloat curl.
Good to see this feature in Curl too. libcurl is very nice, things are designed in a straightforward way and it's flexible, it's a library done with taste, and the curl program is also very helpful and being able to debug websocket related stuff with it might be very handy.
About:
> [libwebsockets] seems (too) tightly integrated with event libraries
I too often was slowed down by this kind of stuff when wanting to use anything on top of glib, like dbus for instance. These things want your program to be written in a certain way, rather than your program being able to call the library as it sees fit. In particular, you need to bent to the glib's event loop, and good luck if your program does not quite work like this. There are ways, but there are not very well documented.
> I too often was slowed down by this kind of stuff when wanting to use anything on top of glib, like dbus for instance. These things want your program to be written in a certain way, rather than your program being able to call the library as it sees fit. In particular, you need to bent to the glib's event loop, and good luck if your program does not quite work like this. There are ways, but there are not very well documented.
To me, that's where it crosses the line from library to framework.
Upvoting you because you're being downvoted and I skimmed the page and somehow missed it at first too. The answer is:
> The plan is to make curl do websockets similar to telnet/nc. That part of the work has not been started.
Edit: Come on man, whoever downvoted me too. It's easy to miss if you skim. I included the answer in my reply. And I tried to save the poster some karma because I thought they were being downvoted more than they deserved. Some people just can't be happy.
I trust him to implement WebSockets correctly, it's way easier than most things he probably had to handle in curl.
It's good he went for a solution that does not bloat curl.
Good to see this feature in Curl too. libcurl is very nice, things are designed in a straightforward way and it's flexible, it's a library done with taste, and the curl program is also very helpful and being able to debug websocket related stuff with it might be very handy.
About:
> [libwebsockets] seems (too) tightly integrated with event libraries
I too often was slowed down by this kind of stuff when wanting to use anything on top of glib, like dbus for instance. These things want your program to be written in a certain way, rather than your program being able to call the library as it sees fit. In particular, you need to bent to the glib's event loop, and good luck if your program does not quite work like this. There are ways, but there are not very well documented.