#include <string.h>
#include <amxc/amxc_macros.h>
#include <amxc/amxc.h>
#include <amxp/amxp_signal.h>
#include <amxp/amxp_connection.h>
Go to the source code of this file.
|
static amxp_connection_t * | amxp_connection_get_internal (amxc_llist_t *list, int fd) |
|
static int | amxp_can_add_connection (int fd, uint32_t type) |
|
static int | amxp_connection_add_impl (amxp_connection_t *con, amxp_fd_cb_t reader) |
|
static void | amxp_connection_free (amxc_llist_it_t *it) |
|
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_t * | amxp_connection_get (int fd) |
| Gets the connection data for a file descriptor. More...
|
|
amxp_connection_t * | amxp_connection_get_first (uint32_t type) |
| Gets the first connection of the given type. More...
|
|
amxp_connection_t * | amxp_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...
|
|
static DESTRUCTOR void | amxp_connection_cleanup (void) |
|
◆ _GNU_SOURCE
◆ amxp_can_add_connection()
static int amxp_can_add_connection |
( |
int |
fd, |
|
|
uint32_t |
type |
|
) |
| |
|
static |
Definition at line 84 of file amxp_connections.c.
95 retval = con == NULL ? 0 : -1;
#define AMXP_CONNECTION_LISTEN
static amxc_llist_t connections
static amxc_llist_t listeners
static amxp_connection_t * amxp_connection_get_internal(amxc_llist_t *list, int fd)
◆ amxp_connection_add_impl()
Definition at line 100 of file amxp_connections.c.
105 amxc_var_init(&var_fd);
106 amxc_var_set(fd_t, &var_fd, con->
fd);
119 amxc_var_clean(&var_fd);
void amxp_sigmngr_trigger_signal(amxp_signal_mngr_t *const sig_mngr, const char *name, const amxc_var_t *const data)
Triggers a signal.
static void reader(UNUSED int fd, UNUSED void *priv)
◆ amxp_connection_cleanup()
static DESTRUCTOR void amxp_connection_cleanup |
( |
void |
| ) |
|
|
static |
◆ amxp_connection_free()
static void amxp_connection_free |
( |
amxc_llist_it_t * |
it | ) |
|
|
static |
◆ amxp_connection_get_internal()
static amxp_connection_t* amxp_connection_get_internal |
( |
amxc_llist_t * |
list, |
|
|
int |
fd |
|
) |
| |
|
static |
◆ connections
◆ listeners