mirror of https://github.com/OpenRCT2/OpenRCT2.git
Rename NETWORK_LAN_BROADCAST_PORT to kNetworkLanBroadcastPort
This commit is contained in:
parent
5ef115941d
commit
82c31b80d4
|
@ -107,7 +107,7 @@ private:
|
||||||
{
|
{
|
||||||
if (_lanListener->GetStatus() != SocketStatus::Listening)
|
if (_lanListener->GetStatus() != SocketStatus::Listening)
|
||||||
{
|
{
|
||||||
_lanListener->Listen(NETWORK_LAN_BROADCAST_PORT);
|
_lanListener->Listen(kNetworkLanBroadcastPort);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -274,7 +274,7 @@ std::future<std::vector<ServerListEntry>> ServerList::FetchLocalServerListAsync(
|
||||||
auto udpSocket = CreateUdpSocket();
|
auto udpSocket = CreateUdpSocket();
|
||||||
|
|
||||||
LOG_VERBOSE("Broadcasting %zu bytes to the LAN (%s)", msg.size(), broadcastAddress.c_str());
|
LOG_VERBOSE("Broadcasting %zu bytes to the LAN (%s)", msg.size(), broadcastAddress.c_str());
|
||||||
auto len = udpSocket->SendData(broadcastAddress, NETWORK_LAN_BROADCAST_PORT, msg.data(), msg.size());
|
auto len = udpSocket->SendData(broadcastAddress, kNetworkLanBroadcastPort, msg.data(), msg.size());
|
||||||
if (len != msg.size())
|
if (len != msg.size())
|
||||||
{
|
{
|
||||||
throw std::runtime_error("Unable to broadcast server query.");
|
throw std::runtime_error("Unable to broadcast server query.");
|
||||||
|
|
|
@ -9,8 +9,8 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
constexpr int16_t kNetworkDefaultPort = 11753;
|
constexpr uint16_t kNetworkDefaultPort = 11753;
|
||||||
#define NETWORK_LAN_BROADCAST_PORT 11754
|
constexpr uint16_t kNetworkLanBroadcastPort = 11754;
|
||||||
#define NETWORK_LAN_BROADCAST_MSG "openrct2.server.query"
|
#define NETWORK_LAN_BROADCAST_MSG "openrct2.server.query"
|
||||||
#define MAX_SERVER_DESCRIPTION_LENGTH 256
|
#define MAX_SERVER_DESCRIPTION_LENGTH 256
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue