VLC  3.0.21
Functions
io.c File Reference
Include dependency graph for io.c:

Functions

int rootwrap_bind (int family, int socktype, int protocol, const struct sockaddr *addr, size_t alen)
 Tries to obtain a bound TCP socket from the root process. More...
 
int net_Socket (vlc_object_t *p_this, int family, int socktype, int protocol)
 
int * net_Listen (vlc_object_t *p_this, const char *psz_host, int i_port, int type, int protocol)
 
ssize_t() net_Read (vlc_object_t *restrict obj, int fd, void *restrict buf, size_t len)
 Reads data from a socket, blocking until all requested data is received or the end of the stream is reached. More...
 
ssize_t() net_Write (vlc_object_t *obj, int fd, const void *buf, size_t len)
 Writes data to a socket. More...
 
char * net_Gets (vlc_object_t *obj, int fd)
 Reads a line from a file descriptor. More...
 
ssize_t net_Printf (vlc_object_t *p_this, int fd, const char *psz_fmt,...)
 
ssize_t net_vaPrintf (vlc_object_t *p_this, int fd, const char *psz_fmt, va_list args)
 

Function Documentation

◆ net_Read()

ssize_t() net_Read ( vlc_object_t *restrict  obj,
int  fd,
void *restrict  buf,
size_t  len 
)

Reads data from a socket, blocking until all requested data is received or the end of the stream is reached.

This function is a cancellation point.

Returns
-1 on error, or the number of bytes of read.

References msg_Err, msg_Warn, vlc_killed(), vlc_recv_i11e(), vlc_strerror_c(), and vlc_testcancel().

◆ rootwrap_bind()

int rootwrap_bind ( int  family,
int  socktype,
int  protocol,
const struct sockaddr *  addr,
size_t  alen 
)

Tries to obtain a bound TCP socket from the root process.

References getenv(), MSG_NOSIGNAL, and recv_fd().

Referenced by net_Listen().