I am trying to use the flag 'MSG_DONTWAIT
' in the following python code:
RECV_BUFFER_SIZE = 1024
buff = memoryview(bytearray(RECV_BUFFER_SIZE))
x = client_socket.recv_into(buff, RECV_BUFFER_SIZE, socket.MSG_DONTWAIT)
where I am just reading from the socket.
Strangely, when I use 'MSG_WAITALL' flag, the code works fine, however it fails with the following error:
x = client_socket.recv_into(buff, RECV_BUFFER_SIZE, socket.MSG_DONTWAIT)
AttributeError: module 'socket' has no attribute 'MSG_DONTWAIT'
when I try to use 'MSG_DONTWAIT'
from the same class MsgFlag in which 'MSG_WAITALL'
was present. I am running this on windows platform.