New configuration variable, log_to_file

Shutdown function added to TcpClient
Shutdown function added to TcpServer
Renamed socket to server_tcp_socket in TcpServer
Implemented ConfigReader class
This commit is contained in:
xX-TheDoctor-Xx
2016-07-23 12:35:20 +01:00
parent 6fa7872a6d
commit c83b4101d0
11 changed files with 66 additions and 12 deletions

View File

@ -67,6 +67,19 @@ TcpClient::~TcpClient()
Utility::Delete(result);
}
void TcpClient::Shutdown()
{
uint16 code = shutdown(tcp_socket, SD_SEND);
if (code == SOCKET_ERROR)
{
if (Config::GetUsingConsole())
std::cerr << WSAGetLastError() << std::endl; // display more info
}
closesocket(tcp_socket);
WSACleanup();
}
const std::string &TcpClient::GetIP()
{
return ip;