Hacker News new | ask | show | jobs
by adamzegelin 898 days ago
My comment was suggesting that it's more than just a "lightweight" HTTP/websockets/MQTT library.

The majority of the things I list are optional features of the core library (rather than examples) enabled by cmake flags, some of which look to be enabled by default:

  option(LWS_WITH_JPEG "Enable stateful JPEG stream decoder" ON)
I would be slightly surprised if I saw a dependency on "libwebsockets" and found that it brought in a JPEG decoder, for example.

All these extra features may imply that it's grown past its original goals, and that the other bits and pieces could be split into smaller parts, etc.

1 comments

This is just the endemic result of C++ lacking a package manager.

Every library starts out small, adds its own vendored utilities, adds its own dependencies, and eventually becomes boost.

To be fair to this project, theyve worked quite hard to make the library consumable by others… but yes, its hard to look at the code like https://github.com/warmcat/libwebsockets/blob/50ba61082dc40b...

…and not go… really? As part of the core of libwebsocket?

When you read the justification it’s mostly “well we have a good framework now, so why not use it for other things too?”

C++ life.

/shrug

This... really doesn't match my experience at all. Most libraries I encounter in C really are self-contained. Seeing a random websockets library also feature a JPEG decoder is really surprising.
This is C though, so a C++ package manager wouldn't help ;)
Don‘t you need a http server to bring about any websocket connection through the upgrade mechanism? Otherwise it would only be a websocket client library