VLC  2.1.0-git
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
tcp.c File Reference
Include dependency graph for tcp.c:

Functions

static int SocksNegotiate (vlc_object_t *, int fd, int i_socks_version, const char *psz_user, const char *psz_passwd)
static int SocksHandshakeTCP (vlc_object_t *, int fd, int i_socks_version, const char *psz_user, const char *psz_passwd, const char *psz_host, int i_port)
int net_Socket (vlc_object_t *p_this, int i_family, int i_socktype, int i_protocol)
int net_Connect (((vlc_object_t *)(vlc_object_t *p_this)), const char *psz_host, int i_port, int type, int proto)
int net_AcceptSingle (vlc_object_t *obj, int lfd)
int net_Accept (((vlc_object_t *)(vlc_object_t *p_this)), int *pi_fd)
 Accepts an new connection on a set of listening sockets.
void net_ListenClose (int *pi_fd)

Function Documentation

int net_Accept ( ((vlc_object_t *)(vlc_object_t *p_this))  ,
int *  pi_fd 
)

Accepts an new connection on a set of listening sockets.

If there are no pending connections, this function will wait.

Note
If the thread needs to handle events other than incoming connections, you need to use poll() and net_AcceptSingle() instead.
Parameters
p_thisVLC object for logging and object kill signal
pi_fdlistening socket set
Returns
-1 on error (may be transient error due to network issues), a new socket descriptor on success.

References pollfd::events, pollfd::fd, msg_Err, net_AcceptSingle(), net_errno, poll(), POLLIN, pollfd::revents, and vlc_object_waitpipe().

int net_AcceptSingle ( vlc_object_t obj,
int  lfd 
)

References pollfd::fd, msg_Dbg, msg_Err, net_errno, and vlc_accept().

Referenced by net_Accept().

int net_Connect ( ((vlc_object_t *)(vlc_object_t *p_this))  ,
const char *  psz_host,
int  i_port,
int  type,
int  proto 
)
void net_ListenClose ( int *  pi_fd)

References net_Close.

Referenced by httpd_HostCreate(), and httpd_HostDelete().

int net_Socket ( vlc_object_t p_this,
int  i_family,
int  i_socktype,
int  i_protocol 
)
static int SocksHandshakeTCP ( vlc_object_t p_obj,
int  fd,
int  i_socks_version,
const char *  psz_user,
const char *  psz_passwd,
const char *  psz_host,
int  i_port 
)
static

< Unspecified error

< Unspecified error

< Unspecified error

< Unspecified error

< Unspecified error

< Unspecified error

< Unspecified error

< Unspecified error

< Unspecified error

< Unspecified error

< No error

References AI_IDN, freeaddrinfo(), msg_Dbg, msg_Err, msg_Warn, net_Read, net_Write, SetWBE(), SocksNegotiate(), VLC_EGENERIC, vlc_getaddrinfo(), and VLC_SUCCESS.

Referenced by net_Connect().

static int SocksNegotiate ( vlc_object_t p_obj,
int  fd,
int  i_socks_version,
const char *  psz_user,
const char *  psz_passwd 
)
static

< No error

< Unspecified error

< Unspecified error

< Unspecified error

< Unspecified error

< Unspecified error

< Unspecified error

< No error

References msg_Dbg, msg_Err, net_Read, net_Write, VLC_EGENERIC, and VLC_SUCCESS.

Referenced by SocksHandshakeTCP().