Conscience Core
Public Member Functions | List of all members
conscience_core::communication::CscMessageSender Class Reference

#include <CscMessageSender.h>

Public Member Functions

 CscMessageSender (const CscMessageEncryption *encryption, const CscMessagingPort udpResponsePort)
 
 ~CscMessageSender ()
 
void sendAndDownloadResponseBytes (vector< unsigned char > *data, fs::path downloadResponseToPath, ptr< CscMessagingRequestContext > context, optional< function< void(float progress)>> onDownloadProgress={})
 
optional< vector< unsigned char > * > send (vector< unsigned char > *data, ptr< CscMessagingRequestContext > context)
 
optional< vector< unsigned char > * > send (vector< unsigned char > *data, const string ip, CscMessagingPort port, CscMessagingProtocol protocol)
 
optional< vector< unsigned char > * > sendTcp (vector< unsigned char > *data, const string ip, const int port)
 
optional< vector< unsigned char > * > sendTcpWithClient (TcpClient *tcpClient, vector< unsigned char > *data, bool noResponseExpected, bool closeClient)
 
optional< vector< unsigned char > * > sendMessage (const string &message, ptr< CscMessagingRequestContext > context)
 
optional< vector< unsigned char > * > sendMessage (const string &message, const string ip, CscMessagingPort port, CscMessagingProtocol protocol)
 
optional< vector< unsigned char > * > sendUdp (const string &message, const string ip, CscMessagingPort port) const
 
optional< vector< unsigned char > * > sendUdp (vector< unsigned char > *data, const string ip, CscMessagingPort port) const
 
optional< vector< unsigned char > * > sendTcpWithClient (TcpClient *tcpClient, const string &message, bool noResponseExpected, bool closeClient)
 

Constructor & Destructor Documentation

◆ CscMessageSender()

conscience_core::communication::CscMessageSender::CscMessageSender ( const CscMessageEncryption encryption,
const CscMessagingPort  udpResponsePort 
)

@notre encryption will NOT be deleted on this sender's destruction

◆ ~CscMessageSender()

conscience_core::communication::CscMessageSender::~CscMessageSender ( )
inline

Member Function Documentation

◆ send() [1/2]

optional<vector<unsigned char>*> conscience_core::communication::CscMessageSender::send ( vector< unsigned char > *  data,
const string  ip,
CscMessagingPort  port,
CscMessagingProtocol  protocol 
)
Parameters
datawill be deleted in this method

◆ send() [2/2]

optional<vector<unsigned char>*> conscience_core::communication::CscMessageSender::send ( vector< unsigned char > *  data,
ptr< CscMessagingRequestContext context 
)
Parameters
datawill be deleted in this method

◆ sendAndDownloadResponseBytes()

void conscience_core::communication::CscMessageSender::sendAndDownloadResponseBytes ( vector< unsigned char > *  data,
fs::path  downloadResponseToPath,
ptr< CscMessagingRequestContext context,
optional< function< void(float progress)>>  onDownloadProgress = {} 
)
Parameters
datawill be deleted in this method

◆ sendMessage() [1/2]

optional<vector<unsigned char>*> conscience_core::communication::CscMessageSender::sendMessage ( const string &  message,
const string  ip,
CscMessagingPort  port,
CscMessagingProtocol  protocol 
)

◆ sendMessage() [2/2]

optional<vector<unsigned char>*> conscience_core::communication::CscMessageSender::sendMessage ( const string &  message,
ptr< CscMessagingRequestContext context 
)

◆ sendTcp()

optional<vector<unsigned char>*> conscience_core::communication::CscMessageSender::sendTcp ( vector< unsigned char > *  data,
const string  ip,
const int  port 
)
Parameters
datawill be deleted in this method

◆ sendTcpWithClient() [1/2]

optional<vector<unsigned char>*> conscience_core::communication::CscMessageSender::sendTcpWithClient ( TcpClient tcpClient,
const string &  message,
bool  noResponseExpected,
bool  closeClient 
)

◆ sendTcpWithClient() [2/2]

optional<vector<unsigned char>*> conscience_core::communication::CscMessageSender::sendTcpWithClient ( TcpClient tcpClient,
vector< unsigned char > *  data,
bool  noResponseExpected,
bool  closeClient 
)
Parameters
datawill be deleted in this method

◆ sendUdp() [1/2]

optional<vector<unsigned char>*> conscience_core::communication::CscMessageSender::sendUdp ( const string &  message,
const string  ip,
CscMessagingPort  port 
) const

◆ sendUdp() [2/2]

optional<vector<unsigned char>*> conscience_core::communication::CscMessageSender::sendUdp ( vector< unsigned char > *  data,
const string  ip,
CscMessagingPort  port 
) const
Parameters
datawill be deleted in this method

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