1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-05 19:31:04 +00:00
luanti/src/network/connection.cpp

17 lines
385 B
C++

// Minetest
// SPDX-License-Identifier: LGPL-2.1-or-later
#include "network/connection.h"
#include "network/mtp/impl.h"
namespace con
{
IConnection *createMTP(float timeout, bool ipv6, PeerHandler *handler)
{
// safe minimum across internet networks for ipv4 and ipv6
constexpr u32 MAX_PACKET_SIZE = 512;
return new con::Connection(MAX_PACKET_SIZE, timeout, ipv6, handler);
}
}