pub unsafe extern "C" fn switch_socket_recv(
sock: *mut switch_socket_t,
buf: *mut c_char,
len: *mut switch_size_t,
) -> switch_status_tExpand description
Read data from a network. @param sock The socket to read the data from. @param buf The buffer to store the data in. @param len On entry, the number of bytes to receive; on exit, the number of bytes received. @remark
This functions acts like a blocking read by default. To change this behavior, use fspr_socket_timeout_set() or the APR_SO_NONBLOCK socket option. The number of bytes actually received is stored in argument 3. It is possible for both bytes to be received and an APR_EOF or other error to be returned. APR_EINTR is never returned.