Add comments

This commit is contained in:
2025-08-14 20:23:45 -04:00
parent f441b186b5
commit 1da824d8cb
5 changed files with 61 additions and 14 deletions

View File

@@ -37,17 +37,22 @@ SocketServer::SocketServer(int port)
mIsOkay=true;
}
/// @brief Close down the listener
SocketServer::~SocketServer()
{
std::cout << "~SocketServer()" << std::endl;
close();
}
/// @brief returns true if we have a valid socket connection otherwise false
/// @return
bool SocketServer::isOkay(void)
{
return mIsOkay;
}
/// @brief This is the listener. It will wait for incoming connections.
/// When an incoming connection is received it will create a SocketConnectionReceiver object and call it's threadFunction to handle further interactions
/// such as transmitting a file.
void SocketServer::listen(void)
{
while(isOkay())
@@ -75,6 +80,8 @@ void SocketServer::listen(void)
}
}
/// @brief Shut down the listener socket
/// @param
void SocketServer::close(void)
{
if(-1!=mSocketFileDescriptor)