From 3a2a690ee8a9df77c574634efbd604e0bf4c25f2 Mon Sep 17 00:00:00 2001 From: Eao3piq4e Date: Wed, 10 Aug 2022 16:25:37 +0800 Subject: [PATCH] Update mc_tcp.cpp --- .../cbb/communication/libcomm_core/mc_tcp.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/gausskernel/cbb/communication/libcomm_core/mc_tcp.cpp b/src/gausskernel/cbb/communication/libcomm_core/mc_tcp.cpp index 42d678d0d..b07a50652 100644 --- a/src/gausskernel/cbb/communication/libcomm_core/mc_tcp.cpp +++ b/src/gausskernel/cbb/communication/libcomm_core/mc_tcp.cpp @@ -236,7 +236,8 @@ static void mc_tcp_do_listen(int fd, int backlog) /* function name: mc_tcp_read_block -description: This function receives data from the other end of TCP in a blocking manner. +description: This function receives data from the other end of TCP in a blocking manner, the receiving + process will not end until the data of size byte length is successfully received or a real error occurs in the receiving process arguments: The first argument indicates the specific socket that has been established. The second argument is a pointer to memory area, we use it to store received data. The third argument is byte length of the memory area pointed to by the data pointer. @@ -319,7 +320,8 @@ int mc_tcp_read_block(int fd, void* data, int size, int flags) /* function name: mc_tcp_read_nonblock -description: This function receives data from the other end of TCP in a non blocking manner. +description: This function receives data from the other end of TCP in a non blocking manner, + the data receiving process is only performed once. arguments: The first argument indicates the specific socket that has been established. The second argument is a pointer to memory area, we use it to store received data. The third argument is byte length of the memory area pointed to by the data pointer. @@ -450,7 +452,8 @@ int mc_tcp_check_socket(int sock) /* function name: mc_tcp_write_block -description: This function writes data to the specified socket in blocking mode. +description: This function writes data to the specified socket in blocking mode, the sending process + will not end until all the data are successfully sent or a real error occurs during the sending process arguments: The first argument indicates the specific socket that has been established. The second argument is a pointer to memory area, we use it to store data to be sent. The third argument is byte length of data to be sent. @@ -520,7 +523,8 @@ int mc_tcp_write_block(int fd, const void* data, int size) /* function name: mc_tcp_write_noblock -description: This function writes data to the specified socket in non blocking mode. +description: This function writes data to the specified socket in non blocking mode, + the data transmission process is only performed once. arguments: The first argument indicates the specific socket that has been established. The second argument is a pointer to memory area, we use it to store data to be sent. The third argument is byte length of data to be sent.