# 1. 前言

嘿！Socket 编程让你感到挫折吗？这份教程是不是只摘录了 man 手册，会很难吗？你想要写很酷的网路程序，可是你没有时间能费力读大量的数据结构，而且还得知道在调用 connect() 之前一定要先调用 bind() 的顺序等。

好，猜到了吗！其实我已经完成了这件痛苦的事情，我正要与你们分享这些数据，所以你来对地方了。本教程的目的是提供一份网路编程简介，给想要了解网路程序的 C 程序员。

在这边做个小结，我在这份教程里已经放上了最新的资料（其实还好啦），而且增加了对 IPv6 的介绍！好好享用它吧！


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://beej-zhcn.netdpi.net/introduction.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
