I hope you can help. I am trying to send 16 packets over the network with the following lines:
for x in packets: s.sendto(x, (host, port))
but the receiver will only get 10 packets out of 16...
Now here is the catch: i added a print statement to see if the loop on the server side is proceeding normaly
so it became like this:
for x in packets: print "in loop" s.sendto(x, (host, port))
And that works perfectly!!!! Then i tried:
for x in packets: time.sleep(0.001) s.sendto(x, (host, port))
Which also works perfectly, and then:
for x in packets: pass s.sendto(x, (host, port))
Which also works!!!! Why the first code example isnt working? Its not big deal for me to add a pass statement but i am extremely curious, plus going around the problem doesnt solve it...
Any suggestions?

New Topic/Question
Reply




MultiQuote





|