This commit is contained in:
Anonymous275 2020-06-17 23:21:08 +03:00
parent 1d88fb755c
commit 3997eb089b

View File

@ -57,6 +57,7 @@ std::string Parse(const std::string& Data){
bool once = false;
[[noreturn]] void MemoryInit();
[[noreturn]] void CoreNetworkThread(){
try {
std::cout << "Ready!" << std::endl;
do {
if (MPDEV)std::cout << "Core Network on start!" << std::endl;
@ -100,14 +101,7 @@ bool once = false;
}
// Setup the TCP listening socket
try{
iResult = bind(ListenSocket, result->ai_addr, (int) result->ai_addrlen);
} catch (std::exception&e) {
std::cout << "Exception! : " << e.what() << std::endl;
system("pause");
exit(1);
}
if (iResult == SOCKET_ERROR) {
if (MPDEV)Exit("(Core) bind failed with error: " + std::to_string(WSAGetLastError()));
freeaddrinfo(result);
@ -171,4 +165,9 @@ bool once = false;
closesocket(ClientSocket);
WSACleanup();
} while (true);
} catch (std::exception&e) {
std::cout << "Exception! : " << e.what() << std::endl;
system("pause");
exit(1);
}
}