Networking Forums

Networking Forums > Computer Networking > Linux Networking > datagram queue?

Reply
Thread Tools Display Modes

datagram queue?

 
 
Jonathan Ellis
Guest
Posts: n/a

 
      08-04-2005, 11:33 PM
I seem to be running into a limit of 64 queued datagrams. This isn't a
data buffer size; varying the size of the datagram makes no difference
in the observed queue size. If more datagrams are sent before some are
read, they are silently dropped. (By "silently," I mean, "tcpdump
doesn't record these as dropped packets.")

This only happens when the sending and receiving processes are on
different machines, btw.

Can anyone tell me where this magic 64 number comes from, so I can
increase it?

Python demo attached.

-Jonathan

# <receive udp requests>
# start this, then immediately start the other
# _on another machine_
import socket, time

sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.bind(('', 3001))

time.sleep(5)

while True:
data, client_addr = sock.recvfrom(8192)
print data


# <separate process to send stuff>
import socket

for i in range(200):
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
sock.sendto('a' * 100, 0, ('***other machine ip***', 3001))
sock.close()

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CLOCK_MONOTONIC datagram timestamps by the kernel Spoon Linux Networking 0 02-24-2007 05:06 PM
Questions about UDP datagram loss Mike Linux Networking 5 03-07-2005 08:58 PM
Sending datagram in raw socket Vicky Linux Networking 0 10-25-2004 10:25 AM
Building and sending raw datagram Vicky Linux Networking 1 10-23-2004 02:38 AM
max udp datagram size Artem Baguinski Linux Networking 6 02-20-2004 05:14 PM



1 2 3 4 5 6 7 8 9 10 11