Commit 6ef40eb6 authored by SherryChaos's avatar SherryChaos

Disable local connection only restriction when Pro2 support is enabled

parent 81a5e2f7
...@@ -88,11 +88,11 @@ bool NetServer::StartServer(unsigned short port) { ...@@ -88,11 +88,11 @@ bool NetServer::StartServer(unsigned short port) {
memset(&sin, 0, sizeof(sin)); memset(&sin, 0, sizeof(sin));
server_port = port; server_port = port;
sin.sin_family = AF_INET; sin.sin_family = AF_INET;
#ifdef SERVER_PRO2_SUPPORT //#ifdef SERVER_PRO2_SUPPORT
sin.sin_addr.s_addr = htonl(INADDR_LOOPBACK); // sin.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
#else //#else
sin.sin_addr.s_addr = htonl(INADDR_ANY); sin.sin_addr.s_addr = htonl(INADDR_ANY);
#endif //#endif
sin.sin_port = htons(port); sin.sin_port = htons(port);
listener = evconnlistener_new_bind(net_evbase, ServerAccept, NULL, listener = evconnlistener_new_bind(net_evbase, ServerAccept, NULL,
LEV_OPT_CLOSE_ON_FREE | LEV_OPT_REUSEABLE, -1, (sockaddr*)&sin, sizeof(sin)); LEV_OPT_CLOSE_ON_FREE | LEV_OPT_REUSEABLE, -1, (sockaddr*)&sin, sizeof(sin));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment