2024-08-19 21:20:20 +02:00
|
|
|
// Minetest
|
|
|
|
// SPDX-License-Identifier: LGPL-2.1-or-later
|
2010-11-29 20:13:04 +02:00
|
|
|
|
2024-08-19 21:20:20 +02:00
|
|
|
#include "network/connection.h"
|
|
|
|
#include "network/mtp/impl.h"
|
2010-11-27 01:02:21 +02:00
|
|
|
|
|
|
|
namespace con
|
|
|
|
{
|
|
|
|
|
2024-08-19 21:20:20 +02:00
|
|
|
IConnection *createMTP(float timeout, bool ipv6, PeerHandler *handler)
|
2019-11-14 17:38:15 +01:00
|
|
|
{
|
2024-08-19 21:20:20 +02:00
|
|
|
// 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);
|
2019-11-14 17:38:15 +01:00
|
|
|
}
|
|
|
|
|
2011-10-20 23:04:09 +03:00
|
|
|
}
|