28 #include <netinet/in.h>
48 #define MQ_MSGSIZE 256
113 char *buffer,
size_t buffer_size);
int aIOSocketPut(aIO_socket_e protocol, char *s_addr, in_port_t port, char *buffer, size_t buffer_size)
Send the data stored in buffer to the socket described by s_addr and port.
Definition: AsyncIO.c:291
void(* aIO_callback_t)(size_t recv_size, char *buffer, void *args)
Callback for an asynchronous IO connection.
Definition: AsyncIO.h:67
void * aIO_handle_t
Handle used to reference and opened asyncronour communications channel.
Definition: AsyncIO.h:53
aIO_socket_e
Socket protocols supported.
Definition: AsyncIO.h:58
aIO_handle_t aIOOpenUDPSocket(char *s_addr, in_port_t port, size_t buffer_size, aIO_callback_t callback, void *args)
Opens a socket enpoint.
int aIOMessageQueuePut(const char *mq_name, char *buffer)
Sends the data stored in buffer to the message queue with the provided name.
Definition: AsyncIO.c:258
void aIODeinit(void)
Function that closes all open connections.
Definition: AsyncIO.c:189
aIO_handle_t aIOOpenTCPSocket(char *s_addr, in_port_t port, size_t buffer_size, aIO_callback_t callback, void *args)
Opens a socket enpoint.
aIO_handle_t aIOOpenMessageQueue(const char *name, long max_msg_num, long max_msg_size, aIO_callback_t callback, void *args)
Open a POSIX message queue.
void aIOCloseConn(aIO_handle_t conn)
Closes a connection and frees all resources used by that connection.
Definition: AsyncIO.c:154
@ TCP
Definition: AsyncIO.h:58
@ UDP
Definition: AsyncIO.h:58