python socket programming OSError: [WinError 10038] an operation was attempted on something that is not a socket
python socket programming OSError: [WinError 10038] an operation was attempted on something that is not a socket
You are closing the clientsock after reading only part of the data.
clientsock.close()
is at the wrong level of indentation. Move it to the left by one step.
The problem is with close().
after connection get close you need to initialize the connection again
add this line inside while loop
serversock = socket(AF_INET, SOCK_STREAM)
python socket programming OSError: [WinError 10038] an operation was attempted on something that is not a socket
Related Posts
- python – Converting string into datetime
- Python – TypeError: int object is not iterable
- python – How do I sort a dictionary by value?
- Does Python have a string contains substring method?
- python – Convert bytes to a string
- What is the Python equivalent for a case/switch statement?
- python – How do I list all files of a directory?