Struct ntex_amqp::Configuration
source · pub struct Configuration {
pub max_frame_size: u32,
pub channel_max: u16,
pub idle_time_out: Milliseconds,
pub hostname: Option<ByteString>,
/* private fields */
}
Expand description
Amqp1 transport configuration.
Fields§
§max_frame_size: u32
§channel_max: u16
§idle_time_out: Milliseconds
§hostname: Option<ByteString>
Implementations§
source§impl Configuration
impl Configuration
sourcepub fn channel_max(&mut self, num: u16) -> &mut Self
pub fn channel_max(&mut self, num: u16) -> &mut Self
The channel-max value is the highest channel number that may be used on the Connection. This value plus one is the maximum number of Sessions that can be simultaneously active on the Connection.
By default channel max value is set to 1024
sourcepub fn max_frame_size(&mut self, size: u32) -> &mut Self
pub fn max_frame_size(&mut self, size: u32) -> &mut Self
Set max frame size for the connection.
By default max size is set to 64kb
sourcepub fn get_max_frame_size(&self) -> u32
pub fn get_max_frame_size(&self) -> u32
Get max frame size for the connection.
sourcepub fn idle_timeout(&mut self, timeout: u16) -> &mut Self
pub fn idle_timeout(&mut self, timeout: u16) -> &mut Self
Set idle time-out for the connection in seconds.
By default idle time-out is set to 120 seconds
sourcepub fn hostname(&mut self, hostname: &str) -> &mut Self
pub fn hostname(&mut self, hostname: &str) -> &mut Self
Set connection hostname
Hostname is not set by default
sourcepub fn max_size(&mut self, size: usize) -> &mut Self
pub fn max_size(&mut self, size: usize) -> &mut Self
Set max inbound frame size.
If max size is set to 0
, size is unlimited.
By default max size is set to 0
sourcepub fn handshake_timeout(&mut self, timeout: Seconds) -> &mut Self
pub fn handshake_timeout(&mut self, timeout: Seconds) -> &mut Self
Set handshake timeout.
By default handshake timeout is 5 seconds.
sourcepub fn keepalive_timeout(&mut self, val: Seconds) -> &mut Self
pub fn keepalive_timeout(&mut self, val: Seconds) -> &mut Self
Set server connection keep-alive timeout.
To disable timeout set value to 0.
By default keep-alive timeout is disabled.
sourcepub fn disconnect_timeout(&mut self, val: Seconds) -> &mut Self
pub fn disconnect_timeout(&mut self, val: Seconds) -> &mut Self
Set server connection disconnect timeout.
Defines a timeout for disconnect connection. If a disconnect procedure does not complete within this time, the connection get dropped.
To disable timeout set value to 0.
By default disconnect timeout is set to 3 seconds.
sourcepub fn frame_read_rate(
&mut self,
timeout: Seconds,
max_timeout: Seconds,
rate: u16
) -> &mut Self
pub fn frame_read_rate( &mut self, timeout: Seconds, max_timeout: Seconds, rate: u16 ) -> &mut Self
Set read rate parameters for single frame.
Set read timeout, max timeout and rate for reading payload. If the client
sends rate
amount of data within timeout
period of time, extend timeout by timeout
seconds.
But no more than max_timeout
timeout.
By default frame read rate is disabled.
pub fn from_remote(&self, open: &Open) -> Configuration
Trait Implementations§
source§impl Clone for Configuration
impl Clone for Configuration
source§fn clone(&self) -> Configuration
fn clone(&self) -> Configuration
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more