1
This commit is contained in:
parent
dd650c0bca
commit
0f16fe1513
@ -152,9 +152,4 @@ namespace a8
|
||||
|
||||
}
|
||||
|
||||
void UdpListener::OnRecvUdpPacket(UdpPacket* pkt)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
#include <arpa/inet.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/epoll.h>
|
||||
#include <netinet/tcp.h>
|
||||
|
||||
namespace a8
|
||||
{
|
||||
struct UdpPacket
|
||||
@ -14,6 +19,7 @@ namespace a8
|
||||
{
|
||||
public:
|
||||
std::function<void (a8::UdpListener*, int error_id)> on_error;
|
||||
std::function<void (a8::UdpListener*, UdpPacket*)> on_recv_packet;
|
||||
std::string bind_address;
|
||||
unsigned short bind_port = 0;
|
||||
|
||||
@ -25,7 +31,6 @@ namespace a8
|
||||
void Close();
|
||||
bool IsActive();
|
||||
virtual void SendUdpPacket(UdpPacket* pkt);
|
||||
virtual void OnRecvUdpPacket(UdpPacket* pkt);
|
||||
|
||||
private:
|
||||
a8::UdpListenerImpl* impl_ = nullptr;
|
||||
|
Loading…
x
Reference in New Issue
Block a user