55 #if !defined(__AMXB_CONNECT_H__)
56 #define __AMXB_CONNECT_H__
int amxb_connect_intf(amxb_bus_ctx_t **ctx, const char *uri, const char *intf)
Create a bus connection.
int amxb_accept(amxb_bus_ctx_t *listen_ctx, amxb_bus_ctx_t **accepted_ctx)
Accepts an incomming connection request.
int amxb_listen(amxb_bus_ctx_t **ctx, const char *uri)
Create a listen socket.
amxc_array_t * amxb_list_uris(void)
List all open connections by their uri.
static void amxb_set_access(amxb_bus_ctx_t *const ctx, uint32_t access)
Sets the access method.
int amxb_connect(amxb_bus_ctx_t **ctx, const char *uri)
Create a bus connection.
amxb_bus_ctx_t * amxb_find_uri(const char *uri)
Find the bus context for a given uri.
static bool amxb_is_data_socket(const amxb_bus_ctx_t *const ctx)
Checks if the provided context is a data socket.
int amxb_read_raw(const amxb_bus_ctx_t *const ctx, void *buf, size_t count)
Attempts to read up to count bytes from the file descriptor into the buffer starting at buf.
static bool amxb_is_listen_socket(const amxb_bus_ctx_t *const ctx)
Checks if the provided context is a listen socket.
void amxb_free(amxb_bus_ctx_t **ctx)
Frees allocated memory.
int amxb_get_fd(const amxb_bus_ctx_t *const ctx)
Get the connection file descriptor.
int amxb_disconnect(amxb_bus_ctx_t *ctx)
Disconnects a bus connection.
int amxb_read(const amxb_bus_ctx_t *const ctx)
Reads data from the file descriptor.