websrv

A simple C web service and REST framework (by AgentD)

Websrv Alternatives

Similar projects and alternatives to websrv

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better websrv alternative or higher similarity.

websrv reviews and mentions

Posts with mentions or reviews of websrv. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-12-18.
  • Ask HN: Resources for Building a Webserver in C?
    10 projects | news.ycombinator.com | 18 Dec 2022
    "Write a tiny web server in C" was a standard exercise when I was in high school, and later again in university. I think I did that at least 3 times as an assignment so far.

    Back in 2015, I dumped the result of the University exercise here: https://github.com/AgentD/websrv and kept adding to it for fun.

    The HTTP 1.x protocol itself is pretty dead simple (if you ignore chunked requests/responses and such) and the more interesting part was actually the socket code.

    Back in school, our teacher had us write a simple forking server and consult the corresponding man pages (man 2 socket, man 7 socket, man 7 tcp). It was an acceptable minimal solution to not even look at the client request, respond with a static string containing a dummy response header and HTML page, which absolutely works. Bonus points for parsing the request path and sending a file back, more extra points if the path was a directory and your server sends back an "index.html" file, further points if it instead generates an HTML directory listing on the fly.

    When I visited our former teacher a couple years ago, he had modified the exercise somewhat. He brought a Beagle Bone Black with him to class, with a bunch of I2C sensors attached to it, and the extended exercise revolve around reporting temperature/humidity/... to the browser.

    So, for "resource" I recommend the HTTP example on Wikipedia, as well as "Beej's guide to network programming" (as have others), as well as the man pages for quick reference.

Stats

Basic websrv repo stats
1
10
10.0
over 7 years ago

AgentD/websrv is an open source project licensed under GNU Affero General Public License v3.0 which is an OSI approved license.

The primary programming language of websrv is C.


Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com