From 95fafe1ce0ea87e9fcabad52733bd26b9203dfd6 Mon Sep 17 00:00:00 2001 From: Eao3piq4e Date: Thu, 11 Aug 2022 18:33:56 +0800 Subject: [PATCH] Update libcomm_adapter.cpp --- .../communication/libcomm_utils/libcomm_adapter.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/gausskernel/cbb/communication/libcomm_utils/libcomm_adapter.cpp b/src/gausskernel/cbb/communication/libcomm_utils/libcomm_adapter.cpp index 034326d6c..d0d681a09 100644 --- a/src/gausskernel/cbb/communication/libcomm_utils/libcomm_adapter.cpp +++ b/src/gausskernel/cbb/communication/libcomm_utils/libcomm_adapter.cpp @@ -322,6 +322,19 @@ static int libcomm_tcp_send(LibcommSendInfo* send_info) return send_bytes; } +/* +function name: libcomm_tcp_recv_noidx +description: This function is used to store the message transmitted from the sender, specifically to obtain + the message from a specific socket. +arguments: recv_ info is a pointer of LibcommRecvInfo* type, pointing to the memory to store the data + received. +return value: If it fails to allocate memory for iov_ Item, return RECV_MEM_ERROR; + If it fails to obtain data, no matter it is a message header or a message body, from the specified socket in blocking mode, return RECV_NET_ERROR; + If the function runs successfully, the byte length of the read message body is returned. +note: none +date: 2022/8/11 +contact tel: 18720816902 +*/ static int libcomm_tcp_recv_noidx(LibcommRecvInfo* recv_info) { int sock = recv_info->socket;