Re: udp sockets
On Dec 2, 10:33 am, "toobe...@googlemail.com"
<toobe...@googlemail.com> wrote:
i am looking around the internet for a while now..... with no helpful
results.
i'm using udp-socket in a program what works fine so far until the
point i try to send a package with a size that exceeds the usual
~1500Byte/package.
the sendto()-call gives me then a "Message too long" error. Do i have
to make the fragmentation of the package myself or does the socket-API
provides any function to split the packages ?
What operating system are you using?
If it is Linux, then man udp(7):
http://www.kernel.org/doc/man-pages/online/pages/man7/udp.7.html
<q>
By default, Linux UDP does path MTU (Maximum Transmission Unit)
discovery. This means the kernel will keep track of the MTU to a
specific target IP address and return EMSGSIZE when a UDP packet
write exceeds it. When this happens, the application should
decrease the packet size. Path MTU discovery can be also turned
off using the IP_MTU_DISCOVER socket option or the
/proc/sys/net/ipv4/ip_no_pmtu_disc file; see ip(7) for details.
When turned off, UDP will fragment outgoing UDP packets that
exceed the interface MTU. However, disabling it is not
recommended for performance and reliability reasons.
</q>
--
Max