UDP over v6: payload truncated at 1024 bytes

Luke Gorrie luke@REDACTED
Mon Apr 5 15:26:07 CEST 2004


Fredrik Thulin <ft@REDACTED> writes:

> So it seems Erlang uses a 8k buffer for v4 and 1k buffer for v6. That does not 
> seem right. In fact, since the biggest UDP datagram size is 64k I think the 
> buffer ought to be 64k for both v4 and v6.

That sounds like the most reasonable default to me too.

You can set this in your code when you open the sockets. Just include
this option in gen_udp:open -

  {recbuf, 65535}

The available options are in the 'erl -man inet' page, under
setopts/2. gen_udp and gen_tcp accept these same options.

-Luke




More information about the erlang-questions mailing list