You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Guys, I just found out that os.dup2 and socket.fileno() does not work on Windows as it is written on docs, as follows:
socket.fileno()
Return the socket’s file descriptor (a small integer). This is useful with select.select().
Under Windows the small integer returned by this method cannot be used where a file descriptor can be used (such as os.fdopen()). Unix does not have this limitation.
Running on python3.12, windows 11, AMD64, 64 bits
Keep having [Errno 9] Bad file descriptor.
Below is my code for the client
I tried the server with two methods:
using netcat-win32-1.12 from https://eternallybored.org/misc/netcat/
AND also writing a simple server.py by myself, as follows:
Something wrong with this example?
The text was updated successfully, but these errors were encountered: