Librasta & Libsci
A C implementation of the RaSTA protocol stack
rasta.h
Go to the documentation of this file.
1 #pragma once
2 
3 #ifdef __cplusplus
4 extern "C" { // only need to export C interface if
5  // used by C++ source code
6 #endif
7 
8 #include <stdbool.h>
9 #include <stddef.h>
10 
11 #include "config.h"
12 #include "events.h"
13 #include "notification.h"
14 #include "rastarole.h"
15 
16 typedef struct rasta rasta;
17 typedef struct rasta_connection rasta_connection;
19 
27 
32 bool rasta_bind(rasta *r);
33 
39 
45 
50 
56 
61 
68 
76 int rasta_recv(rasta *r, rasta_connection *connection, void *buf, size_t len);
77 
85 int rasta_send(rasta *r, rasta_connection *connection, void *buf, size_t len);
86 
92 
99 
100 #ifdef __cplusplus
101 }
102 #endif
logger_type
Definition: config.h:315
log_level
Definition: config.h:292
struct rasta rasta
Definition: events.h:11
rasta * rasta_lib_init_configuration(rasta_config_info *config, log_level log_level, logger_type logger_type)
rasta_cancellation * rasta_prepare_cancellation(rasta *r)
rasta_connection * rasta_connect(rasta *r)
struct rasta_cancellation rasta_cancellation
Definition: rasta.h:18
rasta_connection * rasta_accept_with_cancel(rasta *r, rasta_cancellation *cancel)
void rasta_cleanup(rasta *r)
struct rasta_connection rasta_connection
Definition: rasta.h:17
void rasta_listen(rasta *r)
void rasta_cancel_operation(rasta *r, rasta_cancellation *cancel)
int rasta_send(rasta *r, rasta_connection *connection, void *buf, size_t len)
void rasta_disconnect(rasta_connection *connection)
rasta_connection * rasta_accept(rasta *r)
int rasta_recv(rasta *r, rasta_connection *connection, void *buf, size_t len)
bool rasta_bind(rasta *r)
Definition: config.h:242