如何编写服务器应用程序?

发布于 2024-12-04 22:43:29 字数 526 浏览 1 评论 0原文

只是出于好奇,我想更好地了解互联网是如何运作的。

我已经在维基百科上阅读了很多文章,但这些文章都非常理论化。我知道哪些协议在哪里使用以及它们的用途(IP、TCP、HTTP)。但我不知道这些在 Linux 或任何其他操作系统中是如何实际实现的。

因此,为了让我更好地理解这些事情,我想编写Echo 的简单实现-C 协议,最好适用于 Linux,并且从头开始。我的客户端应用程序应该能够向任何其他计算机上的给定端口发送消息,并且我的服务器应用程序应该能够接收该消息并将其发送回客户端。

我从哪里开始最好?我应该阅读什么才能获得有关这些主题的更多信息?你们中有人已经做过类似的事情吗?如果是的话,您学到了什么?

此外,如果有人能告诉我一个程序,该程序可以向我显示通过我的 PC 运行的原始互联网流量,那就太好了。我认为这也会帮助我更好地理解事情。

提前感谢您的建议。

Just because of curiosity, I'd like to get to know better, how the Internet works.

I have already read quite some articles in Wikipedia, but these are very theoretical. I know, which protocols are used where, and what they are good for (IP, TCP, HTTP). But I have no idea how these are actually implemented in Linux or any other OS.

So, for me to understand these things better, I'd like to write a simple implementation of the Echo-Protocol in C, preferrably for Linux, and from ground up. My client-application should be able to send a message to a given port on any other computer, and my server-application should be able to receive this message, and send it back to the client.

Where do I start best? What should I read to get more information on these topics? Has anyone of you already done something like this, and if so, what did you learn?

In addition, it would be great if someone could tell me a bout a program that shows me the raw Internet-traffic that runs trough my PC. I think this would also help me understanding things a bit better.

Thanks in advance for your advice.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

在你怀里撒娇 2024-12-11 22:43:29

此外,如果有人能告诉我一个可以向我显示通过我的 PC 运行的原始互联网流量的程序,那就太好了。

Ethereal 对此非常有用。

In addition, it would be great if someone could tell me a bout a program that shows me the raw Internet-traffic that runs trough my PC.

Ethereal is pretty great for this.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文