M2-PT-DRP/source/events/info/InfoEvent.cpp

21 lines
427 B
C++

#include "InfoEvent.hpp"
#include <sys/socket.h>
#include "../../tasks/types.hpp"
namespace drp::event {
void InfoEvent::handle(const packet::GenericPacketContent& content) {
Peer peer {};
peer.address = *reinterpret_cast<sockaddr*>(&senderAddress);
peer.addressLength = senderAddressLength;
peer.status = task::TaskType::UNDEFINED;
// save it in the peers list
this->peers.push_back(peer);
}
}