From bc2afe32e8db4318f2a2adea49d85b10d0d4cc97 Mon Sep 17 00:00:00 2001 From: wangzhengquan <wangzhengquan85@126.com> Date: 星期一, 08 二月 2021 16:51:24 +0800 Subject: [PATCH] update --- src/net/net_mod_socket.cpp | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/net/net_mod_socket.cpp b/src/net/net_mod_socket.cpp index ef817f0..2a23bd2 100644 --- a/src/net/net_mod_socket.cpp +++ b/src/net/net_mod_socket.cpp @@ -44,7 +44,7 @@ // delete gpool; // s = pthread_mutex_destroy(&sendMutex); if(s != 0) { - err_exit(s, "shm_close_socket"); + err_exit(s, "shm_socket_close"); } } @@ -308,22 +308,22 @@ } -int NetModSocket::pub(net_node_t *node_arr, int arrlen, char *topic, int topic_size, void *content, int content_size) { +int NetModSocket::pub(net_node_t *node_arr, int arrlen, const char *topic, int topic_size, const void *content, int content_size) { return _pub_(node_arr, arrlen, topic, topic_size, content, content_size, -1); } -int NetModSocket::pub_nowait(net_node_t *node_arr, int arrlen, char *topic, int topic_size, void *content, int content_size) { +int NetModSocket::pub_nowait(net_node_t *node_arr, int arrlen, const char *topic, int topic_size, const void *content, int content_size) { return _pub_(node_arr, arrlen, topic, topic_size, content, content_size, 0); } -int NetModSocket::pub_timeout(net_node_t *node_arr, int arrlen, char *topic, int topic_size, void *content, int content_size, int msec ) { +int NetModSocket::pub_timeout(net_node_t *node_arr, int arrlen, const char *topic, int topic_size, const void *content, int content_size, int msec ) { return _pub_(node_arr, arrlen, topic, topic_size, content, content_size, msec); } // int pub(char *topic, int topic_size, void *content, int content_size, int port); -int NetModSocket::_pub_(net_node_t *node_arr, int arrlen, char *topic, int topic_size, void *content, +int NetModSocket::_pub_(net_node_t *node_arr, int arrlen, const char *topic, int topic_size, const void *content, int content_size, int msec) { int i, connfd; net_node_t *node; @@ -600,7 +600,7 @@ //====================================================================================== int NetModSocket::write_request(int clientfd, net_mod_request_head_t &request_head, - void *content_buf, int content_size, void *topic_buf, int topic_size) { + const void *content_buf, int content_size, const void *topic_buf, int topic_size) { int buf_size; char *buf; -- Gitblit v1.8.0