src/include/xmmsc/xmmsc_sockets.h File Reference

#include <xmmsc/xmmsc_stdbool.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/select.h>
#include <sys/time.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>

Go to the source code of this file.

Defines

#define SOCKET_ERROR   (-1)
#define XMMS_EINTR   EINTR
#define XMMS_EINPROGRESS   EINPROGRESS
#define XMMS_EAGAIN   EWOULDBLOCK

Typedefs

typedef int xmms_socket_t

Functions

int xmms_sockets_initialize (void)
int xmms_socket_set_nonblock (xmms_socket_t socket)
 Tries to set socket to non-blocking mode.
int xmms_socket_valid (xmms_socket_t socket)
void xmms_socket_invalidate (xmms_socket_t *socket)
void xmms_socket_close (xmms_socket_t socket)
int xmms_socket_errno (void)
bool xmms_socket_error_recoverable (void)
int xmms_getaddrinfo (const char *node, const char *service, const struct addrinfo *hints, struct addrinfo **res)
void xmms_freeaddrinfo (struct addrinfo *res)

Define Documentation

#define SOCKET_ERROR   (-1)
#define XMMS_EAGAIN   EWOULDBLOCK

Definition at line 24 of file xmmsc_sockets.h.

Referenced by xmms_socket_error_recoverable().

#define XMMS_EINPROGRESS   EINPROGRESS

Definition at line 19 of file xmmsc_sockets.h.

#define XMMS_EINTR   EINTR

Definition at line 18 of file xmmsc_sockets.h.

Referenced by xmms_socket_error_recoverable().


Typedef Documentation

typedef int xmms_socket_t

Definition at line 37 of file xmmsc_sockets.h.


Function Documentation

void xmms_freeaddrinfo ( struct addrinfo *  res  ) 

Definition at line 26 of file socket_common.c.

Referenced by xmms_ipc_tcp_client_init(), and xmms_ipc_tcp_server_init().

int xmms_getaddrinfo ( const char *  node,
const char *  service,
const struct addrinfo *  hints,
struct addrinfo **  res 
)

Definition at line 19 of file socket_common.c.

Referenced by xmms_ipc_tcp_client_init(), and xmms_ipc_tcp_server_init().

void xmms_socket_close ( xmms_socket_t  socket  ) 

Definition at line 47 of file socket_unix.c.

int xmms_socket_errno ( void   ) 

Definition at line 51 of file socket_unix.c.

Referenced by xmms_socket_error_recoverable().

bool xmms_socket_error_recoverable ( void   ) 

Definition at line 9 of file socket_common.c.

Referenced by xmms_ipc_msg_read_transport(), and xmms_ipc_msg_write_transport().

void xmms_socket_invalidate ( xmms_socket_t socket  ) 

Definition at line 43 of file socket_unix.c.

Referenced by xmms_visualization_new().

int xmms_socket_set_nonblock ( xmms_socket_t  socket  ) 

Tries to set socket to non-blocking mode.

Parameters:
socket Socket to make non-blocking. On success, returns 1. On failure, closes socket and returns 0.

Definition at line 15 of file socket_unix.c.

Referenced by xmms_ipc_tcp_client_init(), and xmms_ipc_tcp_server_init().

int xmms_socket_valid ( xmms_socket_t  socket  ) 

Definition at line 36 of file socket_unix.c.

Referenced by init_udp(), xmms_ipc_tcp_client_init(), and xmms_ipc_tcp_server_init().

int xmms_sockets_initialize ( void   ) 

Definition at line 5 of file socket_unix.c.

Referenced by xmms_ipc_tcp_client_init(), and xmms_ipc_tcp_server_init().


Generated on Tue Feb 23 18:14:36 2010 for XMMS2 by  doxygen 1.6.1