55 #if !defined(__AMXP_CONNECTION_H__)
56 #define __AMXP_CONNECTION_H__
80 #define AMXP_CONNECTION_BUS 0
81 #define AMXP_CONNECTION_LISTEN 1
82 #define AMXP_CONNECTION_CUSTOM 2
void(* amxp_fd_cb_t)(int fd, void *priv)
struct _amxp_connection amxp_connection_t
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.
amxc_llist_t * amxp_connection_get_listeners(void)
Get of the current listen sockets of the application.
amxp_connection_t * amxp_connection_get_next(amxp_connection_t *con, uint32_t type)
Gets the next connection data for a file descriptor.
int amxp_connection_set_el_data(int fd, void *el_data)
Sets event-loop data.
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.
amxp_connection_t * amxp_connection_get_first(uint32_t type)
Gets the first connection of the given type.
amxp_connection_t * amxp_connection_get(int fd)
Gets the connection data for a file descriptor.
amxc_llist_t * amxp_connection_get_connections(void)
Get a list of the current connections of the application.
int amxp_connection_remove(int fd)
Removes the fd from the connection list.
static void reader(UNUSED int fd, UNUSED void *priv)