title: SO_ERROR vs. errno
body: <p>For getting socket syscall (like <code>recv</code>) error, which is better (at performance level) ?</p>
  
  <ul>
  <li>Use the plain old <code>errno</code></li>
  <li>Or use <code>SO_ERROR</code> as <code>getsockopt()</code> optname ?</li>
  </ul>
  
  <p>I think <code>errno</code> (defined to <code>__error()</code> on my system) is faster because it's not a system call. Am I right ?</p>
  
  <p>The advantages of SO_ERROR are : automatic error reset after getting, and we are sure that the error only concerns our socket. It's safer.</p>
  
  <p>Which one do you think is better ? Is there a really difference of performance between the two ?</p>