<p>About recvfrom part I think I got the answer from <br>
<a href="https://www.cs.cmu.edu/%7Esrini/15-441/F01.full/www/assignments/P2/htmlsim_split/node12.html">https://www.cs.cmu.edu/~srini/15-441/F01.full/www/assignments/P2/htmlsim_split/node12.html</a></p>

<blockquote>
<p>"...In an actual UNIX system, socket descriptors are set to be non-blocking using fcntl() with type O_NONBLOCK, and Recvfrom() returns errno EWOULDBLOCK when there is no data to be read on the non-blocking socket"</p>
</blockquote>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/kamailio/kamailio/issues/510#issuecomment-184673602">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZYtBAIRa75pZoxbtp8v8Zr7zh9ciks5pkxTWgaJpZM4HbAEG.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/kamailio/kamailio/issues/510#issuecomment-184673602"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>