# 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.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.
