a8/a8/udpclient.h
2018-08-26 20:34:01 +08:00

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