OXY-SYNC-DIRECTORY 1.0
OXY-SYNC-DIRECTORY Library Documentation
Loading...
Searching...
No Matches
oxy::directory::IConnection Struct Referenceabstract

Interface for a connection to a Thrift service, supporting both pipe and socket connections. More...

#include <services.hpp>

Public Member Functions

virtual ProtocolPtr get_protocol () const =0
 Retrieves the Thrift protocol associated with the connection.
virtual void open_pipe (const std::string &pipeName)=0
 Opens a connection to a Thrift service using a named pipe.
virtual void open_socket (const std::string &hostName, int port, bool ssl=true)=0
 Opens a connection to a Thrift service using a socket.

Detailed Description

Interface for a connection to a Thrift service, supporting both pipe and socket connections.

This interface provides methods for opening connections to a Thrift service using either pipes or sockets. It also provides a method to retrieve the associated Thrift protocol for communication. Implementations of this interface should handle the specifics of establishing and managing the connection.

Member Function Documentation

◆ get_protocol()

virtual ProtocolPtr oxy::directory::IConnection::get_protocol ( ) const
pure virtual

Retrieves the Thrift protocol associated with the connection.

Returns
A shared pointer to the Thrift binary protocol

◆ open_pipe()

virtual void oxy::directory::IConnection::open_pipe ( const std::string & pipeName)
pure virtual

Opens a connection to a Thrift service using a named pipe.

Parameters
pipeNameThe name of the pipe to connect to

◆ open_socket()

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

Opens a connection to a Thrift service using a socket.

Parameters
hostNameThe name of the host to connect to
portThe port number to connect to
sslWhether to use SSL for the connection