Branch: Tag:

2016-07-20

2016-07-20 07:51:41 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Stdio.UDP: Throw less errors in send().

Don't throw errors in send() for reasons that aren't permanent.

Also fixed updating of the object errno in send().

1843:    2 for don't route flag.</p>   </dd>   <dt class='head--doc'>Returns</dt> - <dd class='body--doc'><p>The number of bytes that were actually written.</p> + <dd class='body--doc'><table class='box'><tr><td><code><code class='key'>(0..)</code></code></td><td><p>The number of bytes that were actually written.</p> + </td></tr> + <tr><td><code><code class='key'>(..-1)</code></code></td><td><p>Failed to send the <code>message</code>. Check <code>errno()</code> for +  the cause. Common causes are:</p> + <table class='box'><tr><td><code><code class='key'>System.EMSGSIZE</code></code></td><td><p>The <code>message</code> is too large to send unfragmented.</p> + </td></tr> + <tr><td><code><code class='key'>System.EWOULDBLOCK</code></code></td><td><p>The send buffers are full.</p> + </td></tr> + </table></td></tr> + </table> + </dd> + <dt class='head--doc'>Throws</dt> + <dd class='body--doc'><p>Throws errors on invalid arguments and uninitialized object.</p> + </dd> + <dt class='head--doc'>Note</dt> + <dd class='body--doc'><p>Versions of Pike prior to 8.1.5 threw errors also on EMSGSIZE +  (<code class='expr'>"Too&nbsp;big&nbsp;message"</code>) and EWOULDBLOCK +  .(<code class='expr'>"Message&nbsp;would&nbsp;block."</code>). These versions of Pike also +  did not update the object errno on this function failing.</p>   </dd></dl>