dnp3 (C++ API) 1.6.0
Loading...
Searching...
No Matches
dnp3::ConnectionHandler Class Referenceabstract

Callbacks to user code that determine how the server processes connections. More...

#include <dnp3.hpp>

Public Member Functions

virtual void accept (const char *remote_addr, AcceptHandler &acceptor)=0
 Filter the connection solely based on the remote address. More...
 
virtual void start (const char *remote_addr, MasterChannel &channel)=0
 Start a communication session that was previously accepted using only the socket address. More...
 
virtual void accept_with_link_id (const char *remote_addr, uint16_t source, uint16_t destination, IdentifiedLinkHandler &acceptor)=0
 Filter the connection based on the source and destination of the first link-layer frame. More...
 
virtual void start_with_link_id (const char *remote_addr, uint16_t source, uint16_t destination, MasterChannel &channel)=0
 Start a communication session that was previously accepted using link identity information. More...
 

Detailed Description

Callbacks to user code that determine how the server processes connections.

Note
this class is an "interface" and only has virtual methods, some of which may have default implementations.

Member Function Documentation

◆ accept()

virtual void dnp3::ConnectionHandler::accept ( const char *  remote_addr,
AcceptHandler acceptor 
)
pure virtual

Filter the connection solely based on the remote address.

Parameters
remote_addrSocket address of the remote outstation, e.g. 192.168.0.22:51532
acceptorClass used to handle the accept

◆ accept_with_link_id()

virtual void dnp3::ConnectionHandler::accept_with_link_id ( const char *  remote_addr,
uint16_t  source,
uint16_t  destination,
IdentifiedLinkHandler acceptor 
)
pure virtual

Filter the connection based on the source and destination of the first link-layer frame.

Parameters
remote_addrSocket address of the remote outstation, e.g. 192.168.0.22:51532
sourceSource address from the frame
destinationDestination address from the frame
acceptorClass used to handle the accept

◆ start()

virtual void dnp3::ConnectionHandler::start ( const char *  remote_addr,
MasterChannel channel 
)
pure virtual

Start a communication session that was previously accepted using only the socket address.

Warning
You must add associations and/or enable the channel from a different thread than this callback as those methods cannot be called on the Tokio runtime
Parameters
remote_addrSocket address of the remote outstation, e.g. 192.168.0.22:51532
channelClass used to control the channel

◆ start_with_link_id()

virtual void dnp3::ConnectionHandler::start_with_link_id ( const char *  remote_addr,
uint16_t  source,
uint16_t  destination,
MasterChannel channel 
)
pure virtual

Start a communication session that was previously accepted using link identity information.

Warning
You must add associations and/or enable the channel from a different thread than this callback as those methods cannot be called on the Tokio runtime
Parameters
remote_addrSocket address of the remote outstation, e.g. 192.168.0.22:51532
sourceSource address from the frame
destinationDestination address from the frame
channelClass used to control the channel

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