From db5a0c5e696f31e6172257d94429766265572c3b Mon Sep 17 00:00:00 2001 From: Alain Siegrist Date: Wed, 16 Feb 2022 18:50:46 +0100 Subject: [PATCH] Decrease maximum packet size --- src/lib.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 2d8454a..54934ad 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -29,7 +29,7 @@ pub use naia_server_socket::find_my_ip_address; use turbulence::{ buffer::BufferPacketPool, message_channels::ChannelMessage, - packet::{Packet as PoolPacket, PacketPool, MAX_PACKET_LEN}, + packet::{Packet as PoolPacket, PacketPool}, packet_multiplexer::{IncomingTrySendError, MuxPacketPool}, }; pub use turbulence::{ @@ -47,6 +47,9 @@ pub use transport::{Connection, ConnectionChannelsBuilder, Packet}; pub type ConnectionHandle = u32; +/// The maximum packet length supported by all platforms +const MAX_PACKET_LEN: usize = 1472; + #[derive(Debug, Hash, PartialEq, Eq, Clone, StageLabel)] struct SendHeartbeatsStage;