#include <stdbool.h>
#include <stddef.h>
#include "config.h"
#include "events.h"
#include "notification.h"
#include "rastarole.h"
Go to the source code of this file.
|
| rasta * | rasta_lib_init_configuration (rasta_config_info *config, log_level log_level, logger_type logger_type) |
| |
| bool | rasta_bind (rasta *r) |
| |
| void | rasta_listen (rasta *r) |
| |
| rasta_connection * | rasta_accept (rasta *r) |
| |
| rasta_cancellation * | rasta_prepare_cancellation (rasta *r) |
| |
| rasta_connection * | rasta_accept_with_cancel (rasta *r, rasta_cancellation *cancel) |
| |
| void | rasta_cancel_operation (rasta *r, rasta_cancellation *cancel) |
| |
| rasta_connection * | rasta_connect (rasta *r) |
| |
| int | rasta_recv (rasta *r, rasta_connection *connection, void *buf, size_t len) |
| |
| int | rasta_send (rasta *r, rasta_connection *connection, void *buf, size_t len) |
| |
| void | rasta_disconnect (rasta_connection *connection) |
| |
| void | rasta_cleanup (rasta *r) |
| |
◆ rasta
◆ rasta_cancellation
◆ rasta_connection
◆ rasta_accept()
Wait for incoming connections.
- Parameters
-
| rasta | the user configuration containing the socket information |
◆ rasta_accept_with_cancel()
Wait for incoming connections with the ability to cancel from another thread.
- Parameters
-
| rasta | the user configuration containing the socket information |
◆ rasta_bind()
| bool rasta_bind |
( |
rasta * |
r | ) |
|
binds a RaSTA instance to the configured IP addresses and ports for the transport channels
- Parameters
-
| rasta | the user configuration to be used |
◆ rasta_cancel_operation()
Performs cancellation of a blocking operation.
◆ rasta_cleanup()
| void rasta_cleanup |
( |
rasta * |
r | ) |
|
Cleanup a connection after a disconnect and free assigned ressources. Always use this when a programm terminates, otherwise it may not start again.
- Parameters
-
| rasta | the RaSTA lib configuration |
◆ rasta_connect()
Connect to another rasta instance
- Parameters
-
| rasta | the user configuration of the local RaSTA instance |
| id | the ID of the remote RaSTA instance to connect to |
◆ rasta_disconnect()
disconnect a connection on request by the user
- Parameters
-
| connection | the connection that should be disconnected |
◆ rasta_lib_init_configuration()
initializes the RaSTA handle and all configured connections
- Parameters
-
| rasta | the user configuration containing the handle to initialize |
| config | the configuration to initialize the handle with |
| logger | the logger to use |
◆ rasta_listen()
| void rasta_listen |
( |
rasta * |
r | ) |
|
Listen on all sockets specified by the given RaSTA handle.
- Parameters
-
| rasta | the user configuration containing the socket information |
◆ rasta_prepare_cancellation()
Prepares cancellation of a blocking operation.
◆ rasta_recv()
Receive data on a given RaSTA connection
- Parameters
-
| rasta | the user configuration of the local RaSTA instance |
| connection | the connection from which to receive the data |
| buf | the buffer into which to save the received data |
| len | the size of buf in bytes |
◆ rasta_send()
Send data on a given RaSTA connection
- Parameters
-
| rasta | the user configuration of the local RaSTA instance |
| connection | the connection on which to send the data |
| buf | the buffer from which to read the data to be sent |
| len | the size of buf in bytes |