pub struct ServerConfig {
pub listen_addr: SocketAddr,
pub unit_id: UnitId,
pub max_connections: usize,
pub max_transactions: u16,
pub shutdown_timeout: Duration,
pub device_id: DeviceIdentification,
pub tcp_config: TcpServerConfig,
}Expand description
Server configuration.
Fields§
§listen_addr: SocketAddrAddress to listen on.
unit_id: UnitIdThis server’s Unit ID. Default: UnitId(1).
max_connections: usizeMaximum concurrent connections. Default: 64.
max_transactions: u16Maximum concurrent transactions per connection. Default: 16.
shutdown_timeout: DurationShutdown timeout. Default: 10s.
device_id: DeviceIdentificationDevice identification for FC 0x2B/0x0E.
tcp_config: TcpServerConfigUnderlying TCP server config.
Trait Implementations§
Source§impl Clone for ServerConfig
impl Clone for ServerConfig
Source§fn clone(&self) -> ServerConfig
fn clone(&self) -> ServerConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ServerConfig
impl Debug for ServerConfig
Auto Trait Implementations§
impl Freeze for ServerConfig
impl RefUnwindSafe for ServerConfig
impl Send for ServerConfig
impl Sync for ServerConfig
impl Unpin for ServerConfig
impl UnsafeUnpin for ServerConfig
impl UnwindSafe for ServerConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more