forked from victl/VeloSLAM
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSmallPacketSender.cxx
More file actions
24 lines (20 loc) · 816 Bytes
/
SmallPacketSender.cxx
File metadata and controls
24 lines (20 loc) · 816 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include "SmallPacketSender.h"
//-----------------------------------------------------------------------------
SmallPacketSender::SmallPacketSender(std::string destinationIp,
int port) :
Internal(new SmallPacketSender::vsInternal(destinationIp, port))
{
this->Internal->DataSocket = new boost::asio::ip::udp::socket(this->Internal->IOService);
this->Internal->DataSocket->open(this->Internal->DataEndpoint.protocol());
}
//-----------------------------------------------------------------------------
SmallPacketSender::~SmallPacketSender()
{
delete this->Internal->DataSocket;
delete this->Internal;
}
//-----------------------------------------------------------------------------
size_t SmallPacketSender::packetCount() const
{
return this->Internal->PacketCount;
}