-error:
- msg_Err( p_this, "Read error: %s", net_strerror (net_errno) );
- return i_total ? (int)i_total : -1;
-}
-
-
-/*****************************************************************************
- * __net_Read:
- *****************************************************************************
- * Read from a network socket
- * If b_retry is true, then we repeat until we have read the right amount of
- * data
- *****************************************************************************/
-int __net_Read( vlc_object_t *restrict p_this, int fd,
- const v_socket_t *restrict p_vs,
- uint8_t *restrict p_data, int i_data, vlc_bool_t b_retry )
-{
- return net_ReadInner( p_this, 1, &(int){ fd },
- &(const v_socket_t *){ p_vs },
- p_data, i_data, -1, b_retry );
-}
-
-
-/*****************************************************************************
- * __net_ReadNonBlock:
- *****************************************************************************
- * Read from a network socket, non blocking mode (with timeout)
- *****************************************************************************/
-int __net_ReadNonBlock( vlc_object_t *restrict p_this, int fd,
- const v_socket_t *restrict p_vs,
- uint8_t *restrict p_data, int i_data, mtime_t i_wait)
-{
- return net_ReadInner (p_this, 1, &(int){ fd },
- &(const v_socket_t *){ p_vs },
- p_data, i_data, i_wait / 1000, VLC_FALSE);
-}
-
-
-/*****************************************************************************
- * __net_Select:
- *****************************************************************************
- * Read from several sockets (with timeout). Takes data from the first socket
- * that has some.
- *****************************************************************************/
-int __net_Select( vlc_object_t *restrict p_this, const int *restrict pi_fd,
- const v_socket_t *const *restrict pp_vs,
- int i_fd, uint8_t *restrict p_data, int i_data,
- mtime_t i_wait )
-{
- if( pp_vs == NULL )
- {
- const v_socket_t *vsv[i_fd];
- memset( vsv, 0, sizeof (vsv) );
-
- return net_ReadInner( p_this, i_fd, pi_fd, vsv, p_data, i_data,
- i_wait / 1000, VLC_FALSE );
- }