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

Options that control how TCP connections are established. More...

#include <dnp3.hpp>

Public Member Functions

 ConnectOptions (ConnectOptions &&other) noexcept
 Transfer ownership of the underlying C-type to this instance and invalidate the other instance. More...
 
 ConnectOptions ()
 Initialize to the defaults. More...
 
 ~ConnectOptions ()
 Destroy an instance. More...
 
void set_timeout (std::chrono::steady_clock::duration timeout)
 Set a timeout for the TCP connection that might be less than the default for the OS. More...
 
void set_local_endpoint (const std::string &endpoint)
 Set the local address to which the socket is bound. More...
 

Friends

class CppConnectOptionsFriend
 

Detailed Description

Options that control how TCP connections are established.

Constructor & Destructor Documentation

◆ ConnectOptions() [1/2]

dnp3::ConnectOptions::ConnectOptions ( ConnectOptions &&  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

◆ ConnectOptions() [2/2]

dnp3::ConnectOptions::ConnectOptions ( )

Initialize to the defaults.

◆ ~ConnectOptions()

dnp3::ConnectOptions::~ConnectOptions ( )

Destroy an instance.

Member Function Documentation

◆ set_local_endpoint()

void dnp3::ConnectOptions::set_local_endpoint ( const std::string &  endpoint)

Set the local address to which the socket is bound.

If not specified, then any available adapter may be used with an OS assigned port.

Parameters
endpointString in 'address:port' format, where address can be IPv4 or IPv6. Using 0 for the port results in an OS assigned port
Exceptions
ParamException

◆ set_timeout()

void dnp3::ConnectOptions::set_timeout ( std::chrono::steady_clock::duration  timeout)

Set a timeout for the TCP connection that might be less than the default for the OS.

Parameters
timeoutTimeout value

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