# API

常規 TCP 和使用該協定的程式成功的因素之一是標準化的 socket API。 它具有定義明確的功能，使用此 API，您可以在許多不同的作業系統之間移動程式，因為 TCP 的工作原理相同。

但 QUIC 並不是。 QUIC 目前沒有標準化的 API。

使用 QUIC 時，你需要選擇一個現有的程式庫來實作，並堅持使用它的 API。這在某種程度上把應用 "綁定" 到了單一的庫上。換庫代表著使用另外一套 API，這可能帶來相當的工作量。

另外，由於 QUIC 一般在用戶空間中實作，所以它不像現有的 TCP 和 UDP socket API 那樣能輕鬆擴展。 使用 QUIC 代表著選擇了 socket API 之外的另一套 API。


---

# 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://http3-explained.haxx.se/zh-tw/quic/quic-api.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.
