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

Matt Williamson <>
Thu Nov 6 19:05:23 CET 2008


It's apparent from the subject, that Mark is talking about UDP datagrams.
I agree with Trevor's suggestion. Check out
http://www.erlang.org/doc/man/inet.html#setopts-2
<http://www.erlang.org/doc/man/inet.html#setopts-2>

{sndbuf, Integer}Gives the size of the send buffer to use for the socket.
So: gen_udp:open( Port, [binary, {sndbuf, 700}] ).

On Tue, Oct 28, 2008 at 7:04 PM, 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.
>
> --
> Principal Engineer
> Cheyenne Software Engineering
>  / 35-215
>
> _______________________________________________
> erlang-questions mailing list
> 
> http://www.erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20081106/8ca63cd4/attachment.html>


More information about the erlang-questions mailing list