[erlang-questions] Problems with sending UDP datagrams without buffering
Wed Oct 29 14:56:24 CET 2008
Matthias Lang wrote:
>> 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?
I was making the (probably wrong) assumption that he was actually
meaning gen_dup. :-)
> 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.
If he is sending 700 bytes packets with UDP, I can't see how the total
packet length could become 7000.
Can Erlang also buffer sends internally? I wouldn't have thought so, but
it's not entirely clear from the documentation.
More information about the erlang-questions