L
lgwe
I want to receive 200 udp datagrams. Each into a new data string.
But I dont know how to do that, this is wrong:
import socket
s = socket.socket(socket.AF_INET,socket.SOCK_DGRAM)
s.bind(("",port))
i = 0
while i<200:
data,addr = s.recvfrom(1024)
i = +1
data is illegal.
Any suggestion welcome!
But I dont know how to do that, this is wrong:
import socket
s = socket.socket(socket.AF_INET,socket.SOCK_DGRAM)
s.bind(("",port))
i = 0
while i<200:
data,addr = s.recvfrom(1024)
i = +1
data is illegal.
Any suggestion welcome!