#include <xcom_network_provider.h>
◆ Xcom_network_provider() [1/3]
◆ Xcom_network_provider() [2/3]
◆ Xcom_network_provider() [3/3]
  
  
      
        
          | Xcom_network_provider::Xcom_network_provider  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Construct a new Xcom_network_provider object. 
 
 
◆ ~Xcom_network_provider()
  
  
      
        
          | virtual Xcom_network_provider::~Xcom_network_provider  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inlineoverridevirtual   | 
  
 
 
◆ cleanup_secure_connections_context()
  
  
      
        
          | void Xcom_network_provider::cleanup_secure_connections_context  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
overridevirtual   | 
  
 
 
◆ close_connection()
Closes an open connection to another XCom endpoint served by the same Network provider. 
- Parameters
 - 
  
    | connection | an open and valid connection  | 
  
   
- Returns
 - int an error code in case of error. 0, otherwise. 
 
Implements Network_provider.
 
 
◆ configure()
Configures this network provider. 
It is mandatory to be called in This provider, else we won't know which listen port to use.
- Parameters
 - 
  
    | params | Network_configuration_parameters with the listen port configured  | 
  
   
- Returns
 - true if configure went well. False otherwise. 
 
Implements Network_provider.
 
 
◆ configure_secure_connections()
Configures the active provider with all things needed to establish SSL connections. 
- Parameters
 - 
  
    | params | configuration parameters for SSL. | 
  
   
- Returns
 - true In case of success. 
 
- 
false In case of failure. 
 
Implements Network_provider.
 
 
◆ finalize_secure_connections_context()
  
  
      
        
          | bool Xcom_network_provider::finalize_secure_connections_context  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
overridevirtual   | 
  
 
 
◆ get_communication_stack()
Get the communication stack implemented by this provider. 
Return a valid value withint the range of RunningProtocol enum.
- Returns
 - RunningProtocol valid value 
 
Implements Network_provider.
 
 
◆ get_open_server_socket()
  
  
      
        
          | result Xcom_network_provider::get_open_server_socket  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
 
◆ get_port()
  
  
      
        
          | xcom_port Xcom_network_provider::get_port  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
 
◆ is_provider_initialized()
  
  
      
        
          | bool Xcom_network_provider::is_provider_initialized  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
 
◆ notify_provider_ready()
      
        
          | void Xcom_network_provider::notify_provider_ready  | 
          ( | 
          bool  | 
          init_error = false | ) | 
           | 
        
      
 
Notify that the provider is ready. 
It unblocks wait_for_provider_ready()
- Parameters
 - 
  
    | init_error | sets the error state of this notifier  | 
  
   
 
 
◆ open_connection()
Opens a new connection to another XCom endpoint served by the same Network provider. 
- Parameters
 - 
  
    | address | address of the remote endpoint  | 
    | port | port of the remote endpoint  | 
    | security_credentials | security credentials to connect to the remote endpoint  | 
    | connection_timeout | connection timeout  | 
    | log_level | log level  | 
  
   
- See also
 - network_provider_dynamic_log_level for more information 
 
- Returns
 - std::unique_ptr<Network_connection> an established connection. nullptr in case of failure. 
 
Implements Network_provider.
 
 
◆ set_open_server_socket()
  
  
      
        
          | void Xcom_network_provider::set_open_server_socket  | 
          ( | 
          result  | 
          open_socket | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
 
◆ set_port()
  
  
      
        
          | void Xcom_network_provider::set_port  | 
          ( | 
          xcom_port  | 
          port | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
 
◆ set_shutdown_tcp_server()
  
  
      
        
          | void Xcom_network_provider::set_shutdown_tcp_server  | 
          ( | 
          bool  | 
          shutdown_tcp_server | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
 
◆ should_shutdown_tcp_server()
  
  
      
        
          | bool Xcom_network_provider::should_shutdown_tcp_server  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
 
◆ start()
  
  
      
        
          | std::pair< bool, int > Xcom_network_provider::start  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
overridevirtual   | 
  
 
 
◆ stop()
  
  
      
        
          | std::pair< bool, int > Xcom_network_provider::stop  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
overridevirtual   | 
  
 
Stops the network provider. 
Each implementation will place here any code that it needs to stop a network provider.
stop() is synchronous. After stop() succeeded, it is assumed that XCom shall not receive any new connection.
- Returns
 - a pair of <bool,int> bool indicates the success of the operation. false means success. int returns an error code. 
 
Implements Network_provider.
 
 
◆ wait_for_provider_ready()
      
        
          | bool Xcom_network_provider::wait_for_provider_ready  | 
          ( | 
           | ) | 
           | 
        
      
 
Waits for the provider to become ready. 
This call is blocking.
- Returns
 - true in case of error or timeout 
 
- 
false in case of success 
 
 
 
◆ m_init_cond_var
  
  
      
        
          | std::condition_variable Xcom_network_provider::m_init_cond_var | 
         
       
   | 
  
mutableprivate   | 
  
 
 
◆ m_init_error
  
  
      
        
          | bool Xcom_network_provider::m_init_error | 
         
       
   | 
  
private   | 
  
 
 
◆ m_init_lock
  
  
      
        
          | std::mutex Xcom_network_provider::m_init_lock | 
         
       
   | 
  
mutableprivate   | 
  
 
 
◆ m_initialized
  
  
      
        
          | bool Xcom_network_provider::m_initialized | 
         
       
   | 
  
private   | 
  
 
 
◆ m_network_provider_tcp_server
  
  
      
        
          | std::thread Xcom_network_provider::m_network_provider_tcp_server | 
         
       
   | 
  
private   | 
  
 
 
◆ m_open_server_socket
  
  
      
        
          | result Xcom_network_provider::m_open_server_socket | 
         
       
   | 
  
private   | 
  
 
 
◆ m_port
◆ m_shutdown_tcp_server
  
  
      
        
          | bool Xcom_network_provider::m_shutdown_tcp_server | 
         
       
   | 
  
private   | 
  
 
 
The documentation for this class was generated from the following files: