Closed wbehrens-on-gh closed 2 years ago
I think zmq is not a goodfit for this because it is impossible/hard? to determine what connection each message belongs to. Also you should parse the input messages to determine when the request is complete as it might possibly be sent as multiple messages from zmq.
ah, that's tough. is there another lightweight socket abstraction library you'd recommend?
Well, boost::beast is very good for http and also boost::asio for generic sockets.
I'm trying to use something more lightweight then boost
Ok, there is also standalone ASIO (not sure about Beast).
I'm using cppzmq to try and write an embedded web server currently trying to translate this bsd socket tutorial https://dev-notes.eu/2018/06/http-server-in-c/
My code currently looks like this:
I noticed I'm missing some things like listen and accept(unless cppzmq handles that) but currently trying to view the server at localhost:8000 doesnt work and it just loads forever