Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
EmptySocketClientParams Class Reference

Default implementation that supplies no connection method. More...

#include <SocketClientParams.hxx>

Inheritance diagram for EmptySocketClientParams:
SocketClientParams DefaultSocketClientParams

Public Member Functions

SearchMode search_mode () override
 
string mdns_service_name () override
 
string mdns_host_name () override
 
string manual_host_name () override
 
int manual_port () override
 
bool enable_last () override
 
string last_host_name () override
 
int last_port () override
 
- Public Member Functions inherited from SocketClientParams
virtual bool one_shot ()
 
virtual void set_last (const char *hostname, int port)
 This function is called on an unspecified thread when a connection is successfully established.
 
virtual void log_message (LogMessage id, const string &arg=string())
 Notifies the caller about the current phase of the connection.
 
virtual int retry_seconds ()
 
virtual int timeout_seconds ()
 
virtual bool disallow_local ()
 

Additional Inherited Members

- Public Types inherited from SocketClientParams
enum  SearchMode { AUTO_MANUAL = 0 , MANUAL_AUTO = 1 , AUTO_ONLY = 2 , MANUAL_ONLY = 3 }
 Parameter that determines what order we will attempt to connect. More...
 
enum  LogMessage {
  CYCLE_START = 0 , CONNECT_RE = 1 , MDNS_SEARCH = 2 , MDNS_NOT_FOUND = 3 ,
  MDNS_FOUND = 4 , CONNECT_MDNS = 5 , CONNECT_MANUAL = 6 , CONNECT_FAILED_SELF = 7 ,
  CONNECT_FAILED_ONESHOT = 8 , CONNECTION_LOST
}
 Enum for sending connection status updates to the caller. More...
 
- Static Public Member Functions inherited from SocketClientParams
static std::unique_ptr< SocketClientParamsfrom_static (string hostname, int port)
 
static std::unique_ptr< SocketClientParamsfrom_static_and_mdns (string hostname, int port, string mdns_service)
 

Detailed Description

Default implementation that supplies no connection method.

Definition at line 181 of file SocketClientParams.hxx.

Member Function Documentation

◆ enable_last()

bool EmptySocketClientParams::enable_last ( )
inlineoverridevirtual
Returns
true if first attempt should be to connect to last_host_name:last_port.

Implements SocketClientParams.

Definition at line 221 of file SocketClientParams.hxx.

◆ last_host_name()

string EmptySocketClientParams::last_host_name ( )
inlineoverridevirtual
Returns
the last successfully used IP address, as dotted decimal. Nullptr or empty if no successful connection has ever been made.

Implements SocketClientParams.

Definition at line 229 of file SocketClientParams.hxx.

◆ last_port()

int EmptySocketClientParams::last_port ( )
inlineoverridevirtual
Returns
the last successfully used port number.

Implements SocketClientParams.

Definition at line 235 of file SocketClientParams.hxx.

◆ manual_host_name()

string EmptySocketClientParams::manual_host_name ( )
inlineoverridevirtual
Returns
null or empty string if no manual address is configured. Otherwise a dotted-decimal IP address or a DNS hostname (not mDNS) for manual address to connect to.

Implements SocketClientParams.

Definition at line 208 of file SocketClientParams.hxx.

◆ manual_port()

int EmptySocketClientParams::manual_port ( )
inlineoverridevirtual
Returns
port number to use for manual connection.

Implements SocketClientParams.

Definition at line 214 of file SocketClientParams.hxx.

◆ mdns_host_name()

string EmptySocketClientParams::mdns_host_name ( )
inlineoverridevirtual
Returns
null or empty string if any mdns server is okay to connect to. If nonempty, then only an mdns server will be chosen that has the specific host name.

Implements SocketClientParams.

Definition at line 200 of file SocketClientParams.hxx.

◆ mdns_service_name()

string EmptySocketClientParams::mdns_service_name ( )
inlineoverridevirtual
Returns
the service name to use for mDNS lookup; nullptr or empty string if mdns is not to be used.

Implements SocketClientParams.

Definition at line 192 of file SocketClientParams.hxx.

◆ search_mode()

SearchMode EmptySocketClientParams::search_mode ( )
inlineoverridevirtual
Returns
search mode for how to locate the server.

Implements SocketClientParams.

Definition at line 185 of file SocketClientParams.hxx.


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