如何学习开发 Web 服务器的高级概念
我最近编写了一个小型 C 代码,它使用套接字来侦听端口。它只是回显浏览器向其发出的请求。它为守护进程创建一个线程,也为新请求提供服务。我这样做只是为了了解有关网络服务器的更多信息。我想知道接下来要做什么?
我本来打算阅读 http 的 RFC。 StackOverflow 上已经回答的许多问题建议使用 apache 或 lighthttp 等开源网络服务器,但我不知道如何开始阅读此类开源项目?
I recently wrote a small C code which uses sockets to listen on a port. It simply echos back the request made to it by a browser. It creates a thread for daemon process and also for servicing new requests. I am doing it simply to learn more about webservers in general. I wanted to know what to do ahead?
I was planning to read the RFC for http. Many questions already answered on StackOverflow suggest going through open source webserver like apache or lighthttp, but I dont know how to start reading such open source projects?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是一本关于 HTTP 的非常好的书。我建议开始使用它,然后可能是相关的 RFC。也可以查看 libcurl 的来源,http、https、ftp 等的 ac 库。希望如此有帮助:)
另外 Tiny HTTPd 是某人为学校项目编写的小型 http 服务器,您从中可以学到很多东西。
这是一个简单的 c 语言 http 客户端。
This is a really good book on HTTP. I recommend getting started with that then maybe the relevant RFC's. Also maybe check out the source of libcurl, a c library for http, https, ftp etc. Hope this helps :)
Also Tiny HTTPd is a small http server someone wrote for a school project, you can learn a lot from the source from that.
This is simple http client in c.