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:
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user