[erlang-questions] Problems with sending UDP datagrams without buffering
Wed Oct 29 15:31:22 CET 2008
Sorry for lack of details, it was the end of a long day.
Yes, I am using UDP, not TCP. And to confirm, I am sending 700 bytes,
never any more. I see the 7000 byte datagram in WireShark on another
system monitoring the network. The 7000 bytes are reported as fragmented
packets that have been re-assembled. I am an sending the 700 bytes every
I am assuming that erlang is buffering in a lower layer, but could be
the linux network stack as well.
Johnny Billquist wrote:
> 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
>>>> 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
>> 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.
Cheyenne Software Engineering
More information about the erlang-questions