28 lines
454 B
C++
28 lines
454 B
C++
#ifndef A8_UDPCLIENT_H
|
|
#define A8_UDPCLIENT_H
|
|
|
|
namespace a8
|
|
{
|
|
struct UdpClientImpl;
|
|
class UdpClient
|
|
{
|
|
public:
|
|
std::string remote_address;
|
|
int remote_port = 0;
|
|
|
|
public:
|
|
UdpClient();
|
|
~UdpClient();
|
|
|
|
void Open();
|
|
void Close();
|
|
bool IsActive();
|
|
void SendBuff(const char* buff, unsigned int bufflen);
|
|
|
|
private:
|
|
a8::UdpClientImpl* impl_ = nullptr;
|
|
};
|
|
}
|
|
|
|
#endif
|