dnp3 (C API) 1.8.0-RC1
Loading...
Searching...
No Matches
dnp3_client_connection_handler_t Struct Reference

Provides fine-grained control over how TCP and TLS clients connect to endpoints. More...

#include <dnp3.h>

Data Fields

uint64_t(* disconnected )(const char *, const char *, void *)
 Notification that a previously successful connection failed. The task will sleep for the specified duration before attempting another connection. More...
 
void(* connecting )(const char *, const char *, void *)
 Notification that a connection attempt is being made. More...
 
void(* connect_failed )(const char *, const char *, void *)
 Notification that connection operation failed. More...
 
void(* connected )(const char *, const char *, void *)
 Notification that a connection attempt succeeded. More...
 
void(* resolution_failed )(const char *, void *)
 Notification that DNS resolution failed. More...
 
void(* next )(dnp3_next_endpoint_action_t *, void *)
 Called to get the next endpoint to connect to or to sleep for a duration. Use the provided action object to specify the response. More...
 
void(* on_destroy )(void *arg)
 Callback when the underlying owner doesn't need the interface anymore. More...
 
void * ctx
 Context data. More...
 

Detailed Description

Provides fine-grained control over how TCP and TLS clients connect to endpoints.

Field Documentation

◆ connect_failed

void(* dnp3_client_connection_handler_t::connect_failed) (const char *, const char *, void *)

Notification that connection operation failed.

Parameters
addrSocket address that failed to connect
hostnameOptional hostname (empty string if none)
ctxContext data

◆ connected

void(* dnp3_client_connection_handler_t::connected) (const char *, const char *, void *)

Notification that a connection attempt succeeded.

Parameters
addrSocket address that connected successfully
hostnameOptional hostname (empty string if none)
ctxContext data

◆ connecting

void(* dnp3_client_connection_handler_t::connecting) (const char *, const char *, void *)

Notification that a connection attempt is being made.

Parameters
addrSocket address being connected to
hostnameOptional hostname (empty string if none)
ctxContext data

◆ ctx

void* dnp3_client_connection_handler_t::ctx

Context data.

◆ disconnected

uint64_t(* dnp3_client_connection_handler_t::disconnected) (const char *, const char *, void *)

Notification that a previously successful connection failed. The task will sleep for the specified duration before attempting another connection.

Parameters
addrSocket address that was disconnected
hostnameOptional hostname (empty string if none)
ctxContext data
Returns
Amount of time to sleep before attempting to reconnect

◆ next

void(* dnp3_client_connection_handler_t::next) (dnp3_next_endpoint_action_t *, void *)

Called to get the next endpoint to connect to or to sleep for a duration. Use the provided action object to specify the response.

Parameters
actionAction object to specify next endpoint or sleep duration
ctxContext data

◆ on_destroy

void(* dnp3_client_connection_handler_t::on_destroy) (void *arg)

Callback when the underlying owner doesn't need the interface anymore.

Parameters
argContext data

◆ resolution_failed

void(* dnp3_client_connection_handler_t::resolution_failed) (const char *, void *)

Notification that DNS resolution failed.

Parameters
hostnameHostname that failed to resolve
ctxContext data

The documentation for this struct was generated from the following file: