Timeline for Python Socket Multiple Clients
Current License: CC BY-SA 4.0
12 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Oct 24, 2024 at 15:36 | comment | added | Riccardo | this answer is VERY old. stackoverflow.com/questions/6319268/… | |
| Oct 18, 2020 at 14:44 | comment | added | Jonathan |
Shouldn't import thread read from threading import Thread and thread.start_new_thread() then be replaced by Thread(target=on_new_client, args=(c,addr)) at least for Python 3?
|
|
| Apr 1, 2020 at 15:12 | comment | added | NaNdy | I have adapted your program for python3 and it is coming up with this error Traceback (most recent call last): File "mydir\Server.py", line 29, in <module> print(f"Got connection from \"{addr}\"") NameError: name 'addr' is not defined | |
| Jul 22, 2019 at 18:36 | comment | added | nog642 |
The clientsocket.close() after the while True: in the function and the s.close() after the while True: at the bottom will never be called, since there are no breaks in the while True: and the only way to exit the loop is with an exception, that will not be caught and will end the thread. A context manager would be a better way to make sure the socket is closed.
|
|
| S Oct 16, 2018 at 11:56 | history | suggested | rkta | CC BY-SA 4.0 |
fix code indentation, it's part of the syntax in python
|
| Oct 16, 2018 at 10:20 | review | Suggested edits | |||
| S Oct 16, 2018 at 11:56 | |||||
| S Jan 11, 2017 at 4:07 | history | edited | jcchuks | CC BY-SA 3.0 |
Debugged arguements passed to on_new_client
|
| S Jan 11, 2017 at 4:07 | history | suggested | Community Bot | CC BY-SA 3.0 |
Debugged arguements passed to on_new_client
|
| Jan 11, 2017 at 4:04 | review | Suggested edits | |||
| S Jan 11, 2017 at 4:07 | |||||
| Jan 10, 2017 at 2:59 | comment | added | hoangpx | Could you check this again. I got this error " data = clientsocket.recv(16384) AttributeError: 'tuple' object has no attribute 'recv'" | |
| Oct 31, 2016 at 22:05 | history | edited | jcchuks | CC BY-SA 3.0 |
added 19 characters in body
|
| Oct 31, 2016 at 21:40 | history | answered | jcchuks | CC BY-SA 3.0 |