2020-04-29 20:41:51 -04:00
|
|
|
---
|
|
|
|
id: 5ea9997bbec2e9bc47e94daf
|
|
|
|
title: Understanding Sockets and Creating a TCP Server
|
|
|
|
challengeType: 11
|
|
|
|
videoId: F1QI9tNuDQg
|
2021-10-01 12:24:12 +08:00
|
|
|
bilibiliIds:
|
|
|
|
aid: 848005038
|
|
|
|
bvid: BV1bL4y1a7kJ
|
|
|
|
cid: 409034113
|
2021-01-13 03:31:00 +01:00
|
|
|
dashedName: understanding-sockets-and-creating-a-tcp-server
|
2020-04-29 20:41:51 -04:00
|
|
|
---
|
|
|
|
|
2020-11-27 19:02:05 +01:00
|
|
|
# --question--
|
|
|
|
|
|
|
|
## --text--
|
|
|
|
|
|
|
|
Which of the following functions creates a socket object?
|
|
|
|
|
|
|
|
## --answers--
|
|
|
|
|
|
|
|
`socket.bind((host, port))`
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
`socket.gethostbyname()`
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
`socket.socket(socket.AF_INET, socket.SOCK_STREAM)`
|
|
|
|
|
|
|
|
## --video-solution--
|
|
|
|
|
|
|
|
3
|
2020-04-29 20:41:51 -04:00
|
|
|
|