dnp3 (C++ API) 1.6.0
Loading...
Searching...
No Matches
dnp3::MasterServer Class Reference

Class with methods used to spawn servers. More...

#include <dnp3.hpp>

Public Member Functions

 MasterServer (MasterServer &&other) noexcept
 Transfer ownership of the underlying C-type to this instance and invalidate the other instance. More...
 
 ~MasterServer ()
 Shutdown down the server. More...
 

Static Public Member Functions

static MasterServer create_tcp_server (Runtime &runtime, const std::string &local_addr, const LinkIdConfig &link_id_config, std::unique_ptr< ConnectionHandler > connection_handler)
 Spawn a TCP server that accepts connections from outstations. More...
 

Friends

class CppMasterServerFriend
 

Detailed Description

Class with methods used to spawn servers.

Constructor & Destructor Documentation

◆ MasterServer()

dnp3::MasterServer::MasterServer ( MasterServer &&  other)
inlinenoexcept

Transfer ownership of the underlying C-type to this instance and invalidate the other instance.

Note
the moved class will now throw an exception if any method is called
Parameters
otherClass from which ownership will be transfer to this instance

◆ ~MasterServer()

dnp3::MasterServer::~MasterServer ( )

Shutdown down the server.

Member Function Documentation

◆ create_tcp_server()

static MasterServer dnp3::MasterServer::create_tcp_server ( Runtime runtime,
const std::string &  local_addr,
const LinkIdConfig link_id_config,
std::unique_ptr< ConnectionHandler connection_handler 
)
static

Spawn a TCP server that accepts connections from outstations.

The behavior of each connection is controlled by callbacks to a user-defined implementation of a ConnectionHandler.

Parameters
runtimeRuntime on which to spawn the server
local_addrLocal address on which the server will accept connections
link_id_configConfiguration used when identifying outstations based on received link-frames
connection_handlerCallbacks used to accept and start communication sessions
Returns
Handle to the running server that allows it to be shut down
Exceptions
ParamException

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