Message too long for UDP socket after setting sendBufferSize()
<p>I'm trying to send a UDP datagram (containing a protocol buffers message) and getting message too long exceptions:</p>

<pre><code>java.io.IOException: Message too long
at java.net.PlainDatagramSocketImpl.send(Native Method)
at java.net.DatagramSocket.send(DatagramSocket.java:625)
</code></pre>

<p>I've set the send buffer size, and checked the return value from getBufferSize(), and it's larger than the message:</p>

<pre><code>byte[] b = msg.toByteArray();
            System.out.println( "Serialised message in " + b.length + " bytes (max length: " + network.getSendBufferSize() + ")");
            DatagramPacket p = new DatagramPacket( b, b.length, host, port );
            network.send( p );
</code></pre>

<p>Outputs:</p>

<pre><code>VM version: 16.3-b01-279
Runtime version: 1.6.0_20-b02-279-9M3165
Vendor: Apple Inc.    
Serialised message in 69424 bytes (max length: 531075)
Problem sending packet: java.io.IOException: Message too long
</code></pre>

<p>I could understand if it was refusing to set a large sized buffer, but it seems to be setting whatever I ask, and then not honoring it.</p>

<p>This is on OSX; I've tried both with 1.6 and 1.5</p>
