1
This commit is contained in:
parent
4fb98b218b
commit
f6ee4597d8
@ -15,6 +15,8 @@
|
||||
#include <a8/a8.h>
|
||||
#include <a8/udplistener.h>
|
||||
|
||||
#include <f8/udplog.h>
|
||||
|
||||
namespace a8
|
||||
{
|
||||
|
||||
@ -114,6 +116,12 @@ namespace a8
|
||||
(struct sockaddr*)&from_addr,
|
||||
(socklen_t*)&addr_len);
|
||||
if(ret > 0) {
|
||||
f8::UdpLog::Instance()->Debug("recvfrom host:%s port:%d buflen:%d",
|
||||
{
|
||||
inet_ntoa(from_addr.sin_addr),
|
||||
from_addr.sin_port,
|
||||
ret
|
||||
});
|
||||
a8::UdpPacket* pkt = new a8::UdpPacket();
|
||||
pkt->buf = (char*)malloc(ret + 1);
|
||||
memmove((void*)pkt->buf, recv_buf, ret);
|
||||
|
Loading…
x
Reference in New Issue
Block a user