1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
use Ordering;
static CLIENT_TCP_NO_DELAY: AtomicBool =
new;
static SERVER_TCP_NO_DELAY: AtomicBool =
new;
pub
pub
/// By default, TCP_NODELAY is set to true for all client TCP/TLS connections. This disables Nagle's
/// algorithm causing the OS to send data written to socket ASAP without waiting. This reduces
/// latency and is usually the appropriate setting for DNP3. This library always writes data
/// in units of link-layer frames so the default setting might cause more TCP fragmentation
/// if clients send requests that exceed a single link-layer frame.
///
/// Calling this function will enable Nagle's algorithm for all future outbound TCP connections.
/// This would typically be called prior to creating any TCP/TLS clients.
///
/// In a future 2.0 release, this flag will likely be settable on a per-session basis but is done
/// globally to preserve API compatibility
/// By default, TCP_NODELAY is set to true for all server TCP/TLS connections. This disables Nagle's
/// algorithm causing the OS to send data written to socket ASAP without waiting. This reduces
/// latency and is usually the appropriate setting for DNP3. This library always writes data
/// in units of link-layer frames so the default setting might cause more TCP fragmentation
/// if clients send requests that exceed a single link-layer frame.
///
/// Calling this function will enable Nagle's algorithm for all future TCP connections accepted by servers.
/// This would typically be called prior to creating any TCP/TLS servers.
///
/// In a future 2.0 release, this flag will likely be settable on a per-session basis but is done
/// globally to preserve API compatibility