libamxp  1.4.0
Patterns C Implementation
amxp_connection.h File Reference

Go to the source code of this file.

Data Structures

struct  _amxp_connection
 

Macros

#define AMXP_CONNECTION_BUS   0
 
#define AMXP_CONNECTION_LISTEN   1
 
#define AMXP_CONNECTION_CUSTOM   2
 

Typedefs

typedef void(* amxp_fd_cb_t) (int fd, void *priv)
 
typedef struct _amxp_connection amxp_connection_t
 

Functions

int amxp_connection_add (int fd, amxp_fd_cb_t reader, const char *uri, uint32_t type, void *priv)
 Adds a file descriptor (fd) to the list of fds that must be watched. More...
 
int amxp_connection_wait_write (int fd, amxp_fd_cb_t can_write_cb)
 Adds a watcher to check if a fd is ready for write. More...
 
int amxp_connection_remove (int fd)
 Removes the fd from the connection list. More...
 
amxp_connection_tamxp_connection_get (int fd)
 Gets the connection data for a file descriptor. More...
 
amxp_connection_tamxp_connection_get_first (uint32_t type)
 Gets the first connection of the given type. More...
 
amxp_connection_tamxp_connection_get_next (amxp_connection_t *con, uint32_t type)
 Gets the next connection data for a file descriptor. More...
 
int amxp_connection_set_el_data (int fd, void *el_data)
 Sets event-loop data. More...
 
amxc_llist_t * amxp_connection_get_connections (void)
 Get a list of the current connections of the application. More...
 
amxc_llist_t * amxp_connection_get_listeners (void)
 Get of the current listen sockets of the application. More...
 

Macro Definition Documentation

◆ AMXP_CONNECTION_BUS

#define AMXP_CONNECTION_BUS   0

Definition at line 80 of file amxp_connection.h.

◆ AMXP_CONNECTION_CUSTOM

#define AMXP_CONNECTION_CUSTOM   2

Definition at line 82 of file amxp_connection.h.

◆ AMXP_CONNECTION_LISTEN

#define AMXP_CONNECTION_LISTEN   1

Definition at line 81 of file amxp_connection.h.

Typedef Documentation

◆ amxp_connection_t

◆ amxp_fd_cb_t

typedef void(* amxp_fd_cb_t) (int fd, void *priv)

Definition at line 67 of file amxp_connection.h.