From 2561a007b8d8999a4750046d0cfb3b1ad5af50ac Mon Sep 17 00:00:00 2001 From: zhangmeng <775834166@qq.com> Date: 星期二, 09 四月 2024 15:29:32 +0800 Subject: [PATCH] test for perf --- src/net/net_mod_socket_wrapper.h | 23 ++++++++++++++--------- 1 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/net/net_mod_socket_wrapper.h b/src/net/net_mod_socket_wrapper.h index b869510..c693b2f 100644 --- a/src/net/net_mod_socket_wrapper.h +++ b/src/net/net_mod_socket_wrapper.h @@ -67,7 +67,7 @@ * * @return 0鏄垚鍔燂紝 鍏朵粬鍊兼槸澶辫触鐨勯敊璇爜 */ -int net_mod_socket_sendto(void *_socket, const void *buf, const int size, const int key); +int net_mod_socket_sendto(void *_socket, const void *buf, const int size, const int key, int reset = 0, int data_set = 0); /** * @brief 鍙戦�佷俊鎭紝鍦ㄦ寚瀹氭椂闂村唴娌″彂閫佸畬鎴愪篃杩斿洖銆� @@ -80,7 +80,7 @@ * * @return 0鏄垚鍔燂紝 鍏朵粬鍊兼槸澶辫触鐨勯敊璇爜 */ -int net_mod_socket_sendto_timeout(void *_socket, const void *buf, const int size, const int key, int sec, int nsec); +int net_mod_socket_sendto_timeout(void *_socket, const void *buf, const int size, const int key, int sec, int nsec, int reset = 0, int data_set = 0); /** * @brief 鍙戦�佷俊鎭紝鏃犺鏄惁鍙戦�佸畬鎴愮珛鍒昏繑鍥炪�� @@ -91,7 +91,7 @@ * * @return 0鏄垚鍔燂紝 鍏朵粬鍊兼槸澶辫触鐨勯敊璇爜 */ -int net_mod_socket_sendto_nowait(void *_socket, const void *buf, const int size, const int key); +int net_mod_socket_sendto_nowait(void *_socket, const void *buf, const int size, const int key, int reset = 0, int data_set = 0); /** * @brief 绛夊緟鎺ユ敹淇℃伅锛岀洿鍒版湁娑堟伅鎺ュ彈鍒版墠杩斿洖 @@ -102,7 +102,7 @@ * * @return 0鏄垚鍔燂紝 鍏朵粬鍊兼槸澶辫触鐨勯敊璇爜 */ -int net_mod_socket_recvfrom(void *_socket, void **buf, int *size, int *key); +int net_mod_socket_recvfrom(void *_socket, void **buf, int *size, int *key, int reset = 0, int data_set = 0); /** * @brief 绛夊緟鎺ユ敹淇℃伅锛屽湪鎸囧畾鐨勬椂闂村唴鍗充娇娌℃湁鎺ュ彈鍒版秷鎭篃瑕佽繑鍥� @@ -115,7 +115,7 @@ * * @return 0鏄垚鍔燂紝 鍏朵粬鍊兼槸澶辫触鐨勯敊璇爜 */ -int net_mod_socket_recvfrom_timeout(void *_socket, void **buf, int *size, int *key, int sec, int nsec); +int net_mod_socket_recvfrom_timeout(void *_socket, void **buf, int *size, int *key, int sec, int nsec, int reset = 0, int data_set = 0); /** * @brief 绛夊緟鎺ユ敹淇℃伅锛岀洿鍒版湁娑堟伅鎺ュ彈鍒版墠杩斿洖 @@ -126,10 +126,15 @@ * * @return 0鏄垚鍔燂紝鍏朵粬鍊兼槸澶辫触鐨勯敊璇爜 */ -int net_mod_socket_recvfrom_nowait(void *_socket, void **buf, int *size, int *key); +int net_mod_socket_recvfrom_nowait(void *_socket, void **buf, int *size, int *key, int reset = 0, int data_set = 0); - - +void net_mod_socket_int_set(void * _socket, int data); +void net_mod_socket_svr_set(void * _socket, int data); +int net_mod_socket_int_get(void * _socket); +int net_mod_socket_svr_get(void * _socket); +void net_mod_socket_buf_data_set(void * _socket, std::string str, int val); +int net_mod_socket_buf_data_get(void * _socket, std::string str); +void net_mod_socket_buf_data_del(void * _socket, std::string str); /** * @brief 璺ㄦ満鍣ㄥ彂閫佹秷鎭苟鎺ュ彈杩斿洖鐨勫簲绛旀秷鎭紝鐩村埌鍙戦�佸畬鎴愭墠杩斿洖 @@ -399,4 +404,4 @@ } #endif -#endif \ No newline at end of file +#endif -- Gitblit v1.8.0