Added UPnP Support

Fix i18n type
This commit is contained in:
ANR2ME 2020-01-18 02:32:09 +07:00 committed by Henrik Rydgård
parent 6280d1b11c
commit 33d3ac28de
17 changed files with 938 additions and 18 deletions

View file

@ -44,6 +44,7 @@
//#include <sqlite3.h>
#include "thread/threadutil.h"
#include "Common/FileUtil.h"
#include "Core/Util/PortManager.h"
#include "Core/Core.h"
#include "Core/Host.h"
#include "Core/HLE/proAdhocServer.h"
@ -1675,14 +1676,20 @@ int proAdhocServerThread(int port) // (int argc, char * argv[])
int server = create_listen_socket(port); //SERVER_PORT
// Created Listening Socket
if(server != -1)
if(server != SOCKET_ERROR)
{
// Notify User
INFO_LOG(SCENET, "AdhocServer: Listening for Connections on TCP Port %u", port); //SERVER_PORT
// Port forward
g_PortManager.Add(port, IP_PROTOCOL_TCP);
// Enter Server Loop
result = server_loop(server);
// Remove Port mapping
g_PortManager.Remove(port, IP_PROTOCOL_TCP);
// Notify User
INFO_LOG(SCENET, "AdhocServer: Shutdown complete");
}