About recvfrom part I think I got the answer from https://www.cs.cmu.edu/~srini/15-441/F01.full/www/assignments/P2/htmlsim_spl...
"...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"
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/510#issuecomment-184673602