OXY-SYNC-CONTAINER 1.0
OXY-SYNC-CONTAINER Library Documentation
Loading...
Searching...
No Matches
oxy::sync::service::IConnection Struct Referenceabstract

Interface for connection operations, including opening pipes and sockets. More...

#include <services.hpp>

Public Member Functions

virtual ProtocolPtr get_protocol () const =0
 Get the protocol associated with the connection.
virtual void open_pipe (const std::string &pipeName)=0
 Open a pipe connection with the specified pipe name.
virtual void open_socket (const std::string &hostName, int port, bool ssl=true)=0
 Open a socket connection with the specified host name and port.

Detailed Description

Interface for connection operations, including opening pipes and sockets.

This abstract class defines the interface for connection operations in the sync container library. Implementations of this interface must provide methods to open pipes and sockets, as well as retrieve the associated protocol for communication.

Member Function Documentation

◆ get_protocol()

virtual ProtocolPtr oxy::sync::service::IConnection::get_protocol ( ) const
pure virtual

Get the protocol associated with the connection.

Returns
A shared pointer to the protocol.

◆ open_socket()

virtual void oxy::sync::service::IConnection::open_socket ( const std::string & hostName,
int port,
bool ssl = true )
pure virtual

Open a socket connection with the specified host name and port.

Parameters
hostNameThe name of the host to connect to.
portThe port number to connect to.
sslWhether to use SSL for the connection (default is true).