Skip to main content

Module tcp

Module tcp 

Source
Expand description

Entry points and types for TCP

Modules§

tls
Entry points and types for TLS

Structs§

AcceptConfig
Information returned by user code to configure an accepted connection
BadIpv4Wildcard
Error returned when an IPv4 wildcard is not in the correct format
ConnectOptions
Options that control how TCP connections are established
ConnectionInfo
Information about the next connection attempt
Endpoint
An endpoint as either an IP address or a hostname to resolve
EndpointList
List of IP endpoints
LinkIdConfig
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
ServerHandle
Handle to a running TCP or TLS server. Dropping the handle shuts down the server.
WildcardIPv4
Represents IPv4 addresses which may contain “*” wildcards

Enums§

AcceptAction
Determines what action will be taken when a TCP connection is accepted from an outstation
AddressFilter
Address filter used to control which master address(es) may connect to an outstation.
ClientState
state of TCP client connection
FilterError
error type returned when a filter conflicts with another filter

Traits§

ClientConnectionHandler
Provides fine-grained control over how TCP and TLS clients connect to endpoints
ConnectionHandler
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 Tokio runtime. The task runs until the returned handle, and any AssociationHandle created 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 Tokio runtime. The task runs until the returned handle is dropped.
spawn_outstation_tcp_client_2
Spawn a TCP client task onto the Tokio runtime. The task runs until the returned handle is dropped.