Skip to content

Commit

Permalink
Add config option to set voice server port
Browse files Browse the repository at this point in the history
  • Loading branch information
CyberMor committed Aug 24, 2022
1 parent a38bec2 commit 99b7776
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion server/Network.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
#include <util/logger.h>
#include <util/memory.hpp>

#include "Config.h"

#ifdef _WIN32
#define GetNetError() WSAGetLastError()
#else
Expand Down Expand Up @@ -155,7 +157,7 @@ bool Network::Bind() noexcept

bindAddr.sin_family = AF_INET;
bindAddr.sin_addr.s_addr = INADDR_ANY;
bindAddr.sin_port = NULL;
bindAddr.sin_port = htons(Config::AsInteger("sv_voice_port", NULL));

if (bind(Network::socketHandle, (sockaddr*)(&bindAddr), sizeof(bindAddr)) == SOCKET_ERROR)
{
Expand Down

0 comments on commit 99b7776

Please sign in to comment.