add TcpModule.cpp annotate

This commit is contained in:
chenhaijian 2024-07-22 08:48:20 +08:00
parent eb49a6af0a
commit 8bf3d6f15a

View File

@ -21,6 +21,14 @@
#include <cstdlib>
#include <memory>
#include <sys/types.h>
/**
* @brief Verify that object is a legitimate (existing) server.
*
* @param object Save the address of the character pointer variable.
* If the value of the character pointer pointed by *object is "tcp_server", return turn
* @return true Indicates that the server exists.
* @return false Indicates that the server does not exist
*/
static bool TcpServerObjectCheck(void *object)
{
if (nullptr == object) {
@ -33,6 +41,14 @@ static bool TcpServerObjectCheck(void *object)
}
return true;
}
/**
* @brief Verify that object is a legitimate (existing) client.
*
* @param object Save the address of the character pointer variable.
* If the value of the character pointer pointed by *object is "tcp_client", return turn
* @return true Indicates that the client exists.
* @return false Indicates that the client does not exist
*/
static bool TcpClientObjectCheck(void *object)
{
if (nullptr == object) {