diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/salticidae/event.h | 2 | ||||
-rw-r--r-- | include/salticidae/network.h | 13 | ||||
-rw-r--r-- | include/salticidae/type.h | 2 |
3 files changed, 11 insertions, 6 deletions
diff --git a/include/salticidae/event.h b/include/salticidae/event.h index cc739f2..1dcd49d 100644 --- a/include/salticidae/event.h +++ b/include/salticidae/event.h @@ -669,7 +669,7 @@ void eventcontext_dispatch(eventcontext_t *self); void eventcontext_stop(eventcontext_t *self); void eventcontext_free(eventcontext_t *self); -typedef void (*sigev_callback_t)(int fd, int events); +typedef void (*sigev_callback_t)(int events); sigev_t *sigev_new(const eventcontext_t *self, sigev_callback_t cb); void sigev_add(sigev_t *self, int sig); void sigev_free(sigev_t *self); diff --git a/include/salticidae/network.h b/include/salticidae/network.h index f6bd6fe..6800632 100644 --- a/include/salticidae/network.h +++ b/include/salticidae/network.h @@ -794,16 +794,17 @@ using msgnetwork_conn_t = msgnetwork_t::conn_t; typedef struct msgnetwork_t msgnetwork_t; typedef struct msgnetwork_config_t msgnetwork_config_t; typedef struct msgnetwork_conn_t msgnetwork_conn_t; +#endif + +#endif + +#ifdef SALTICIDAE_CBINDINGS typedef enum msgnetwork_conn_mode_t { CONN_MODE_ACTIVE, CONN_MODE_PASSIVE, CONN_MODE_DEAD } msgnetwork_conn_mode_t; -#endif - -#endif -#ifdef SALTICIDAE_CBINDINGS #ifdef __cplusplus extern "C" { #endif @@ -833,6 +834,10 @@ void msgnetwork_reg_conn_handler(msgnetwork_t *self, msgnetwork_conn_callback_t msgnetwork_t *msgnetwork_conn_get_net(const msgnetwork_conn_t *conn); msgnetwork_conn_mode_t msgnetwork_conn_get_mode(const msgnetwork_conn_t *conn); netaddr_t *msgnetwork_conn_get_addr(const msgnetwork_conn_t *conn); +msgnetwork_config_t *msgnetwork_config_new(); +void msgnetwork_config_free(msgnetwork_config_t *self); +void msgnetwork_listen(msgnetwork_t *self, const netaddr_t *listen_addr); +void msgnetwork_start(msgnetwork_t *self); #ifdef __cplusplus } diff --git a/include/salticidae/type.h b/include/salticidae/type.h index b3da4c2..0bc2ae0 100644 --- a/include/salticidae/type.h +++ b/include/salticidae/type.h @@ -119,7 +119,7 @@ extern "C" { bytearray_t *bytearray_new(); uint8_t *bytearray_data(bytearray_t *arr); size_t bytearray_size(bytearray_t *arr); -void bytearray_free(); +void bytearray_free(bytearray_t *arr); #ifdef __cplusplus } |