22 lines
483 B
C++
22 lines
483 B
C++
|
|
#ifndef UPDCLIENT_HPP
|
|
#define UPDCLIENT_HPP
|
|
|
|
class UDPClient {
|
|
private:
|
|
int sockfd;
|
|
std::string address;
|
|
int port;
|
|
int rmax;
|
|
int family;
|
|
public:
|
|
UDPClient(void);
|
|
std::expected<void, std::string> Bind(std::string address, int port);
|
|
std::expected<void, std::string> Send(std::string buffer);
|
|
std::expected<std::string, std::string> Recv();
|
|
void Close(void);
|
|
~UDPClient(void);
|
|
};
|
|
|
|
#endif
|