Python Threads Flashcards

(6 cards)

1
Q

Allow clients to connect

A

ServerSocket.listen(8)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Buffer size for requests

A

Message = connectionSocket.recv(1500).decode()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Read file and store in outputdata

A

Outputdata = f.read()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Establish new socket when client connects

A

ConnectionSocket, addr = serverSocket.accept()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Multithreading part for a new thread for each client that’s connected

A

Client_thread = threading.thread(target=handle_clients, args=(connectionSocket, addr)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Starting the thread and allowing multiple clients to connect

A

Client_thread.start()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly