31 #ifndef UDPSOCKETOPERATIONS_H_ 32 #define UDPSOCKETOPERATIONS_H_ 35 #include "../Managers/FileDescriptorManager.h" 76 int32_t
proofread(
char *buffer, int32_t bufferSize, std::string &senderIp);
78 int32_t
proofwrite(
const std::shared_ptr<std::vector<char>>& data);
79 int32_t
proofwrite(
const std::vector<char> &data);
81 int32_t
proofwrite(
const char *buffer, int32_t bytesToWrite);
int64_t _readTimeout
Definition: UdpSocket.h:86
std::string _clientIp
Definition: UdpSocket.h:89
void getConnection()
Definition: UdpSocket.cpp:262
void getSocketDescriptor()
Definition: UdpSocket.cpp:238
uint16_t _listenPort
Definition: UdpSocket.h:92
std::string getListenIp()
Definition: UdpSocket.h:60
void setHostname(std::string hostname)
Definition: UdpSocket.h:51
struct addrinfo * _serverInfo
Definition: UdpSocket.h:93
This is the base library main class.
Definition: BaseLib.h:95
bool _autoConnect
Definition: UdpSocket.h:87
BaseLib::SharedObjects * _bl
Definition: UdpSocket.h:85
virtual ~UdpSocket()
Definition: UdpSocket.cpp:57
void setPort(std::string port)
Definition: UdpSocket.h:55
void close()
Definition: UdpSocket.cpp:72
uint16_t getListenPort()
Definition: UdpSocket.h:61
int32_t proofread(char *buffer, int32_t bufferSize, std::string &senderIp)
Reads bytes from UDP socket into "buffer".
Definition: UdpSocket.cpp:84
Definition: BaseLib.cpp:34
std::string getClientIp()
Definition: UdpSocket.h:59
int32_t proofwrite(const std::shared_ptr< std::vector< char >> &data)
Definition: UdpSocket.cpp:138
Definition: UdpSocket.h:41
void autoConnect()
Definition: UdpSocket.cpp:66
std::string _port
Definition: UdpSocket.h:90
std::shared_ptr< BaseLib::UdpSocket > PUdpSocket
Definition: UdpSocket.h:104
std::shared_ptr< FileDescriptor > _socketDescriptor
Definition: UdpSocket.h:97
UdpSocket(BaseLib::SharedObjects *baseLib)
Definition: UdpSocket.cpp:36
std::string _listenIp
Definition: UdpSocket.h:91
void setReadTimeout(int64_t timeout)
Definition: UdpSocket.h:49
void setAutoConnect(bool autoConnect)
Definition: UdpSocket.h:50
std::mutex _readMutex
Definition: UdpSocket.h:94
void open()
Definition: UdpSocket.cpp:61
std::string _hostname
Definition: UdpSocket.h:88
bool isOpen()
Definition: UdpSocket.cpp:233
std::mutex _writeMutex
Definition: UdpSocket.h:95