UDP queue size

  • Thread starter §ä´M¦Û¤vªº¤@¤ù¤Ñ
  • Start date
§

§ä´M¦Û¤vªº¤@¤ù¤Ñ

I got a problem about UDP.

How do I get the UDP buffer size?

When the server had some delay in handling incoming UDP, it will lost
some package. I wonder it's because the system buffer size, is there any
ways to find the exactly size of the buffer?

ex:

client.py
----------------
import socket

s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
for i in xrange(1000):
s.sendto('xxx', ('192.168.1.135',10000))



server.py: in ip (192.168.1.135)
----------------
import socket
import time
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.bind(('',10000))
time.sleep(10)

# here will only recv 255 package, others are lost...
for i in xrange(1000):
msg, addr = s.recvfrom(500)
print i
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top