diff options
author | Andrey Nazarov <skuller@skuller.net> | 2014-01-03 13:22:45 +0400 |
---|---|---|
committer | Andrey Nazarov <skuller@skuller.net> | 2014-12-01 23:03:23 +0300 |
commit | 6ed835d943063ea4a81071e7b7d8dae50ff700ba (patch) | |
tree | d3c101b02b5388f6fddc0c3903af259e0cf21e37 | |
parent | f0ec1cdcae487fa6d3d4154a18ed47f0edb34d61 (diff) |
Remove ‘net_tcp_*’ console variables.
They are not really useful but confusing.
-rw-r--r-- | doc/server.txt | 16 | ||||
-rw-r--r-- | src/common/net/net.c | 30 |
2 files changed, 5 insertions, 41 deletions
diff --git a/doc/server.txt b/doc/server.txt index 95486f3..4a3290e 100644 --- a/doc/server.txt +++ b/doc/server.txt @@ -17,7 +17,7 @@ Network ~~~~~~~ net_ip:: - Specifies network interface address server should listen on for UDP + Specifies network interface address server should listen on for UDP and TCP connections. The same interface is also used for outgoing TCP connections (these include MVD/GTV and anticheat connections). Default value is empty, which means listening on all interfaces. @@ -29,18 +29,8 @@ one of your network interfaces using the ‘net_ip’ cvar, otherwise expect any kinds of problems. net_port:: - Specifies port number server should listen on for UDP connections. Default - value is 27910. - -net_tcp_ip:: - Specifies network interface address server should listen on for TCP - connections (these include MVD/GTV connections, enabled only when - ‘sv_mvd_enable’ is set, see below). Empty string means listening on all - interfaces. Value of this cvar mirrors ‘net_ip’ unless modified by user. - -net_tcp_port:: - Specifies port number server should listen on for TCP connections. Value - of this cvar mirrors ‘net_port’ unless modified by user. + Specifies port number server should listen on for UDP and TCP connections. + Default value is 27910. net_ignore_icmp:: On Win32 and Linux, server is able to receive ICMP diff --git a/src/common/net/net.c b/src/common/net/net.c index a0b1746..4d14736 100644 --- a/src/common/net/net.c +++ b/src/common/net/net.c @@ -95,10 +95,6 @@ static cvar_t *net_log_name; static cvar_t *net_log_flush; #endif -static cvar_t *net_tcp_ip; -static cvar_t *net_tcp_port; -static cvar_t *net_tcp_backlog; - #if USE_ICMP static cvar_t *net_ignore_icmp; #endif @@ -1167,13 +1163,12 @@ neterr_t NET_Listen(qboolean arg) return NET_AGAIN; } - s = TCP_OpenSocket(net_tcp_ip->string, - net_tcp_port->integer, NS_SERVER); + s = TCP_OpenSocket(net_ip->string, net_port->integer, NS_SERVER); if (s == -1) { return NET_ERROR; } - ret = os_listen(s, net_tcp_backlog->integer); + ret = os_listen(s, 128); if (ret) { os_closesocket(s); return ret; @@ -1561,25 +1556,9 @@ static void NET_Restart_f(void) static void net_udp_param_changed(cvar_t *self) { - // keep TCP socket vars in sync unless modified by user - if (!(net_tcp_ip->flags & CVAR_MODIFIED)) { - Cvar_SetByVar(net_tcp_ip, net_ip->string, FROM_CODE); - } - if (!(net_tcp_port->flags & CVAR_MODIFIED)) { - Cvar_SetByVar(net_tcp_port, net_port->string, FROM_CODE); - } - NET_Restart_f(); } -static void net_tcp_param_changed(cvar_t *self) -{ - if (tcp_socket != -1) { - NET_Listen(qfalse); - NET_Listen(qtrue); - } -} - /* ==================== NET_Init @@ -1609,11 +1588,6 @@ void NET_Init(void) #if USE_ICMP net_ignore_icmp = Cvar_Get("net_ignore_icmp", "0", 0); #endif - net_tcp_ip = Cvar_Get("net_tcp_ip", net_ip->string, 0); - net_tcp_ip->changed = net_tcp_param_changed; - net_tcp_port = Cvar_Get("net_tcp_port", net_port->string, 0); - net_tcp_port->changed = net_tcp_param_changed; - net_tcp_backlog = Cvar_Get("net_tcp_backlog", "4", 0); #if _DEBUG net_log_enable_changed(net_log_enable); |