-
problem
#!/usr/bin/python
import socket
sock = socket.socket(socket.AF_INET,socket.SOCK_RAW,socket.IPPROTO_TCP)
while 1:
print sock.recvfrom(65565)
sock.close()
i run that prog but why its gives error (10022 invalid argument)on recvfrom(65565) i also changed it like recvfrom(1024) but its gives error i run it on windows xp sp2i also tried bind with it but that type its give error on bind like
#!/usr/bin/python
import socket
sock = socket.socket(socket.AF_INET,socket.SOCK_RAW,socket.IPPROTO_TCP)
host = "192.168.1.2"
port = 0
sock.bind((host,port))
while 1:
print sock.recvfrom(65565)
sock.close()
that time its gives error (10022 invalid argument)on bind tell why its coming
-
Re: problem
Port numbers are just 16 bits so 65565 is not valid.
-
Re: problem
-
Re: problem
Oh, I assumed it was the port since it was close to 16 bit max value. Sorry.