This is an automated email from the ASF dual-hosted git repository. rbulter pushed a commit to branch feature/add_msg_segemenation_to_tcp_admin_with_wire_v2_add_make_non_blocking_v2 in repository https://gitbox.apache.org/repos/asf/celix.git
commit 5eac987339b091de864595134f0be9241f51de5e Merge: 78ed431 8e35298 Author: Roy Bulter <[email protected]> AuthorDate: Mon Jun 29 21:43:57 2020 +0200 Merge master bundles/pubsub/examples/CMakeLists.txt | 7 +-- .../src/pubsub_psa_tcp_constants.h | 12 ++++ .../pubsub_admin_tcp/src/pubsub_tcp_handler.c | 12 ++-- .../pubsub_admin_tcp/src/pubsub_tcp_handler.h | 5 +- .../src/pubsub_tcp_topic_receiver.c | 15 +++-- .../pubsub_admin_tcp/src/pubsub_tcp_topic_sender.c | 8 ++- .../src/pubsub_psa_udpmc_constants.h | 11 ++++ .../src/pubsub_udpmc_topic_receiver.c | 6 +- .../src/pubsub_udpmc_topic_sender.c | 17 +++++- .../src/pubsub_psa_websocket_constants.h | 6 ++ .../src/pubsub_websocket_topic_receiver.c | 6 +- .../src/pubsub_psa_zmq_constants.h | 12 ++++ .../pubsub/pubsub_admin_zmq/src/pubsub_zmq_admin.c | 6 +- .../src/pubsub_zmq_topic_receiver.c | 6 +- bundles/pubsub/pubsub_utils/include/pubsub_utils.h | 10 ++++ bundles/pubsub/pubsub_utils/src/pubsub_utils.c | 15 +++++ bundles/pubsub/test/CMakeLists.txt | 6 +- bundles/pubsub/test/test/test_runner.cc | 44 +++++++++++++- bundles/pubsub/test/test/tst_activator.c | 6 +- .../{tst_activator.c => tst_endpoint_activator.c} | 67 ++++++---------------- 20 files changed, 191 insertions(+), 86 deletions(-) diff --cc bundles/pubsub/pubsub_admin_tcp/src/pubsub_tcp_handler.c index b404ec4,7fe8bc3..5099aad --- a/bundles/pubsub/pubsub_admin_tcp/src/pubsub_tcp_handler.c +++ b/bundles/pubsub/pubsub_admin_tcp/src/pubsub_tcp_handler.c @@@ -652,16 -642,16 +652,12 @@@ int pubsub_tcpHandler_listen(pubsub_tcp } // --// Setup buffer sizes ++// Setup receive buffer size // --int pubsub_tcpHandler_createReceiveBufferStore(pubsub_tcpHandler_t *handle, -- unsigned int maxNofBuffers -- __attribute__((__unused__)), -- unsigned int bufferSize) { ++int pubsub_tcpHandler_setReceiveBufferSize(pubsub_tcpHandler_t *handle, unsigned int size) { if (handle != NULL) { celixThreadRwlock_writeLock(&handle->dbLock); -- handle->bufferSize = bufferSize; -- handle->maxNofBuffer = maxNofBuffers; ++ handle->bufferSize = size; celixThreadRwlock_unlock(&handle->dbLock); } return 0; diff --cc bundles/pubsub/pubsub_admin_tcp/src/pubsub_tcp_handler.h index 28df5b7,ed4581c..bb74387 --- a/bundles/pubsub/pubsub_admin_tcp/src/pubsub_tcp_handler.h +++ b/bundles/pubsub/pubsub_admin_tcp/src/pubsub_tcp_handler.h @@@ -58,11 -58,10 +58,8 @@@ int pubsub_tcpHandler_close(pubsub_tcpH int pubsub_tcpHandler_connect(pubsub_tcpHandler_t *handle, char *url); int pubsub_tcpHandler_disconnect(pubsub_tcpHandler_t *handle, char *url); int pubsub_tcpHandler_listen(pubsub_tcpHandler_t *handle, char *url); -- --int pubsub_tcpHandler_createReceiveBufferStore(pubsub_tcpHandler_t *handle, -- unsigned int maxNofBuffers, -- unsigned int bufferSize); ++int pubsub_tcpHandler_setReceiveBufferSize(pubsub_tcpHandler_t *handle, unsigned int size); +int pubsub_tcpHandler_setMaxMsgSize(pubsub_tcpHandler_t *handle, unsigned int size); void pubsub_tcpHandler_setTimeout(pubsub_tcpHandler_t *handle, unsigned int timeout); void pubsub_tcpHandler_setSendRetryCnt(pubsub_tcpHandler_t *handle, unsigned int count); void pubsub_tcpHandler_setReceiveRetryCnt(pubsub_tcpHandler_t *handle, unsigned int count); diff --cc bundles/pubsub/pubsub_admin_tcp/src/pubsub_tcp_topic_receiver.c index eb6afbd,abc44f4..71890d9 --- a/bundles/pubsub/pubsub_admin_tcp/src/pubsub_tcp_topic_receiver.c +++ b/bundles/pubsub/pubsub_admin_tcp/src/pubsub_tcp_topic_receiver.c @@@ -207,14 -213,14 +213,11 @@@ pubsub_tcp_topic_receiver_t *pubsub_tcp long retryCnt = celix_properties_getAsLong(topicProperties, PUBSUB_TCP_SUBSCRIBER_RETRY_CNT_KEY, PUBSUB_TCP_SUBSCRIBER_RETRY_CNT_DEFAULT); double rcvTimeout = celix_properties_getAsDouble(topicProperties, PUBSUB_TCP_SUBSCRIBER_RCVTIMEO_KEY, PUBSUB_TCP_SUBSCRIBER_RCVTIMEO_DEFAULT); -- long sessions = celix_bundleContext_getPropertyAsLong(ctx, PSA_TCP_MAX_RECV_SESSIONS, -- PSA_TCP_DEFAULT_MAX_RECV_SESSIONS); -- long buffer_size = celix_bundleContext_getPropertyAsLong(ctx, PSA_TCP_RECV_BUFFER_SIZE, ++ long bufferSize = celix_bundleContext_getPropertyAsLong(ctx, PSA_TCP_RECV_BUFFER_SIZE, PSA_TCP_DEFAULT_RECV_BUFFER_SIZE); long timeout = celix_bundleContext_getPropertyAsLong(ctx, PSA_TCP_TIMEOUT, PSA_TCP_DEFAULT_TIMEOUT); pubsub_tcpHandler_setThreadName(receiver->socketHandler, topic, scope); -- pubsub_tcpHandler_createReceiveBufferStore(receiver->socketHandler, (unsigned int) sessions, -- (unsigned int) buffer_size); ++ pubsub_tcpHandler_setReceiveBufferSize(receiver->socketHandler, (unsigned int) bufferSize); pubsub_tcpHandler_setTimeout(receiver->socketHandler, (unsigned int) timeout); pubsub_tcpHandler_addMessageHandler(receiver->socketHandler, receiver, processMsg); pubsub_tcpHandler_addReceiverConnectionCallback(receiver->socketHandler, receiver, psa_tcp_connectHandler,
