2020-04-29 20:41:51 -04:00
|
|
|
---
|
|
|
|
id: 5ea9997bbec2e9bc47e94daf
|
|
|
|
title: Understanding Sockets and Creating a TCP Server
|
|
|
|
challengeType: 11
|
|
|
|
videoId: F1QI9tNuDQg
|
|
|
|
---
|
|
|
|
|
|
|
|
## Description
|
|
|
|
<section id='description'>
|
|
|
|
</section>
|
|
|
|
|
|
|
|
## Tests
|
|
|
|
<section id='tests'>
|
|
|
|
|
|
|
|
```yml
|
|
|
|
question:
|
2020-05-28 22:40:36 +09:00
|
|
|
text: |
|
|
|
|
Which of the following functions creates a socket object?
|
|
|
|
|
2020-04-29 20:41:51 -04:00
|
|
|
answers:
|
2020-05-28 22:40:36 +09:00
|
|
|
- |
|
|
|
|
`socket.bind((host, port))`
|
|
|
|
- |
|
|
|
|
`socket.gethostbyname()`
|
|
|
|
- |
|
|
|
|
`socket.socket(socket.AF_INET, socket.SOCK_STREAM)`
|
2020-04-29 20:41:51 -04:00
|
|
|
solution: 3
|
|
|
|
```
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|