[−][src]Struct laminar::Config
Contains the configuration options to configure laminar for special use-cases.
Fields
idle_connection_timeout: Duration
Value which can specify the amount of time that can pass without hearing from a client before considering them disconnected
max_packet_size: usize
Value which can specify the maximum size a packet can be in bytes. This value is inclusive of fragmenting; if a packet is fragmented, the total size of the fragments cannot exceed this value.
Recommended value: 16384
max_fragments: u8
Value which can specify the maximal allowed fragments.
Why can't I have more than 255 (u8)? This is because you don't want to send more then 256 fragments over UDP, with high amounts of fragments the chance for an invalid packet is very high. Use TCP instead (later we will probably support larger ranges but every fragment packet then needs to be resent if it doesn't get an acknowledgment).
default: 16 but keep in mind that lower is better.
fragment_size: u16
Value which can specify the size of a fragment.
This is the maximum size of each fragment. It defaults to 1450
bytes, due to the default MTU on most network devices being 1500
.
fragment_reassembly_buffer_size: u16
Value which can specify the size of the buffer that queues up fragments ready to be reassembled once all fragments have arrived.```
receive_buffer_max_size: usize
Value that specifies the size of the buffer the UDP data will be read into. Defaults to 1450
bytes.
rtt_smoothing_factor: f32
Value which can specify the factor which will smooth out network jitter.
use-case: If one packet hast not arrived we don't directly want to transform to a bad network state.
Value that specifies the factor used to smooth out network jitter. It defaults to 10% of the round-trip time. It is expressed as a ratio, with 0 equal to 0% and 1 equal to 100%. This helps prevent flapping of VirtualConnections
rtt_max_value: u16
Value which can specify the maximal round trip time (rtt) for packet.
Value which specifies the maximum round trip time before we consider it a problem. This is expressed in milliseconds.
socket_event_buffer_size: usize
Value which can specify the event buffer we read socket events into.
Value that specifies the size of the event buffer into which we receive socket events, in bytes. Defaults to 1024.
socket_polling_timeout: Option<Duration>
Value which can specify how long we should block polling for socket events.
Value that specifies how long we should block polling for socket events, in milliseconds. Defaults to 1ms
.
Trait Implementations
Auto Trait Implementations
impl Unpin for Config
impl Sync for Config
impl Send for Config
impl UnwindSafe for Config
impl RefUnwindSafe for Config
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,