Add comments
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user