[erlang-questions] Problems with sending UDP datagrams without buffering

Matthias Lang matthias@REDACTED
Wed Oct 29 14:44:11 CET 2008


> Mark Geib wrote:
> > I have a case where I MUST send datagrams that are smaller than a
> > network frame. The device I am sending to will not except larger datagrams.

> > I am sending message that are less than 700 bytes in length, but on the
> > network using a sniffer I periodically see datagrams from the
> > application that are 7000 bytes or so in size. The data is correct, the
> > end device will not accept.

> > I am sending these datagrams about every 20 miliseconds.

> > Is there an option I am missing to force every gen_dup:send() to cause
> > the datagram to be sent.?? I am running on linux 2.6.27 kernel.

On Wednesday, October 29, Johnny Billquist wrote:
> If you are using TCP, there are no such concept as a datagram. TCP is a 
> stream oriented connection.

I don't understand the original poster's question.

For starters, he says he's using "gen_dup:send()". There is no
gen_dup. I'm guessing it's a typo for gen_udp:send(). So it can't be TCP.
Or can it?

But if I assume that, then the only way to get a "datagram" (does he mean
"UDP payload" or does he mean "IP packet" or something else? I don't know)
7000 octets long is to pass a 7000 octet argument to gen_udp:send.

Original poster, please explain more precisely. A minimal (three or
four lines should be enough) program which actually works and also
shows what you're doing and a description of how to see it failing
(e.g. "I run the program on my linux box on Erlang R12B-4 and see this
output from 'tcpdump' but I expected...") would be nice.

Matt



More information about the erlang-questions mailing list