#!/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