From 4fed5578db7714d8317d1bfe9262143d25034d00 Mon Sep 17 00:00:00 2001 From: Determinant Date: Fri, 14 Feb 2020 15:41:54 -0500 Subject: add more to C API --- include/salticidae/network.h | 2 ++ src/network.cpp | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/include/salticidae/network.h b/include/salticidae/network.h index 6fe8395..dd05ed3 100644 --- a/include/salticidae/network.h +++ b/include/salticidae/network.h @@ -1308,6 +1308,8 @@ void salticidae_injected_msg_callback(const msg_t *msg, msgnetwork_conn_t *conn) msgnetwork_config_t *msgnetwork_config_new(); void msgnetwork_config_free(const msgnetwork_config_t *self); +void msgnetwork_config_max_msg_size(msgnetwork_config_t *self, size_t size); +void msgnetwork_config_max_msg_queue_size(msgnetwork_config_t *self, size_t size); void msgnetwork_config_burst_size(msgnetwork_config_t *self, size_t burst_size); void msgnetwork_config_max_listen_backlog(msgnetwork_config_t *self, int backlog); void msgnetwork_config_conn_server_timeout(msgnetwork_config_t *self, double timeout); diff --git a/src/network.cpp b/src/network.cpp index 4717953..e3eb56c 100644 --- a/src/network.cpp +++ b/src/network.cpp @@ -23,6 +23,14 @@ msgnetwork_t *msgnetwork_new(const eventcontext_t *ec, const msgnetwork_config_t void msgnetwork_free(const msgnetwork_t *self) { delete self; } +void msgnetwork_config_max_msg_size(msgnetwork_config_t *self, size_t size) { + self->max_msg_size(size); +} + +void msgnetwork_config_max_msg_queue_size(msgnetwork_config_t *self, size_t size) { + self->max_msg_queue_size(size); +} + void msgnetwork_config_burst_size(msgnetwork_config_t *self, size_t burst_size) { self->burst_size(burst_size); } -- cgit v1.2.3-70-g09d2