---
id: 5ea9997bbec2e9bc47e94daf
title: 瞭解套接字並創建 TCP 服務器
challengeType: 11
videoId: F1QI9tNuDQg
dashedName: understanding-sockets-and-creating-a-tcp-server
---

# --question--

## --text--

以下哪個函數創建套接字對象？

## --answers--

`socket.bind((host, port))`

---

`socket.gethostbyname()`

---

`socket.socket(socket.AF_INET, socket.SOCK_STREAM)`

## --video-solution--

3

