Expand description
Entry points and types for TCP
Modules§
- tls
- Entry points and types for TLS
Structs§
- Accept
Config - Information returned by user code to configure an accepted connection
- BadIpv4
Wildcard - Error returned when an IPv4 wildcard is not in the correct format
- Connect
Options - Options that control how TCP connections are established
- Connection
Info - Information about the next connection attempt
- Endpoint
- An endpoint as either an IP address or a hostname to resolve
- Endpoint
List - List of IP endpoints
- Link
IdConfig - Configuration that controls how the server performs remote link identification
- Reject
- Error type indicating the connection should be rejected
- Server
- A builder for creating a TCP server with one or more outstation instances associated with it
- Server
Handle - Handle to a running TCP or TLS server. Dropping the handle shuts down the server.
- WildcardI
Pv4 - Represents IPv4 addresses which may contain “*” wildcards
Enums§
- Accept
Action - Determines what action will be taken when a TCP connection is accepted from an outstation
- Address
Filter - Address filter used to control which master address(es) may connect to an outstation.
- Client
State - state of TCP client connection
- Filter
Error - error type returned when a filter conflicts with another filter
Traits§
- Client
Connection Handler - Provides fine-grained control over how TCP and TLS clients connect to endpoints
- Connection
Handler - Callbacks to user code that determine how a master acting as a TCP or TLS server processes connections
Functions§
- disable_
client_ tcp_ no_ delay - 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.
- disable_
server_ tcp_ no_ delay - 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.
- spawn_
master_ tcp_ client - Spawn a task onto the
Tokioruntime. The task runs until the returned handle, and anyAssociationHandlecreated from it is dropped. - spawn_
master_ tcp_ client_ 2 - Just like spawn_master_tcp_client, but this variant was added later to also accept and apply ConnectOptions.
- spawn_
master_ tcp_ client_ 3 - Just like spawn_master_tcp_client_2, but this variant provides fine-grained
control over the connection management using a user-defined implementation
of
ClientConnectionHandler - spawn_
master_ tcp_ server - Spawn a TCP server that accepts connections from outstations
- spawn_
outstation_ tcp_ client - Spawn a TCP client task onto the
Tokioruntime. The task runs until the returned handle is dropped. - spawn_
outstation_ tcp_ client_ 2 - Spawn a TCP client task onto the
Tokioruntime. The task runs until the returned handle is dropped.