#include "InfoEvent.hpp" #include #include "../../tasks/types.hpp" namespace drp::event { void InfoEvent::handle( Context& context, const packet::GenericPacketContent& content, sockaddr* fromAddress, const socklen_t fromAddressLength ) { const auto remotePeer = std::make_shared(); remotePeer->address = *reinterpret_cast(&fromAddress); remotePeer->addressLength = fromAddressLength; // TODO(Faraphel): convert the memory from content to Peer. remotePeer->information = content; // save it in the peers list context.remotePeers.push_back(remotePeer); } }