* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software

* params: socket
* data - buffer for the results
* data_len -
* flags - recv flags for the first recv (see recv(2)), only
* 0, MSG_WAITALL and MSG_DONTWAIT make sense
* if flags is set to MSG_DONWAIT (or to 0 and the socket fd is non-blocking),
* and if no data is queued on the fd, recv_all will not wait (it will
* return error and set errno to EAGAIN/EWOULDBLOCK). However if even 1 byte
* is queued, the call will block until the whole data_len was read or an
* error or eof occured ("semi-nonblocking" behaviour, some tcp code
* counts on it).
* if flags is set to MSG_WAITALL it will block even if no byte is available.
*