2020-08-13 12:00:20 +02:00
|
|
|
---
|
|
|
|
id: 5ea9997bbec2e9bc47e94daf
|
2021-02-06 04:42:36 +00:00
|
|
|
title: Understanding Sockets and Creating a TCP Server
|
2020-08-13 12:00:20 +02:00
|
|
|
challengeType: 11
|
|
|
|
videoId: F1QI9tNuDQg
|
2021-01-13 03:31:00 +01:00
|
|
|
dashedName: understanding-sockets-and-creating-a-tcp-server
|
2020-08-13 12:00:20 +02:00
|
|
|
---
|
|
|
|
|
2020-12-16 00:37:30 -07: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
|
|
|
|
|