#include <udppacket.h>
Public Member Functions | |
UDPPacket ()=default | |
UDPPacket (const UDPPacket &other)=default | |
UDPPacket & | operator= (const UDPPacket &other)=default |
UDPPacket (UDPPacket &&other) noexcept | |
UDPPacket & | operator= (UDPPacket &&other) noexcept |
UDPPacket (const std::string &string) noexcept | |
UDPPacket (std::vector< nap::uint8 > &&buffer) | |
UDPPacket (const std::vector< nap::uint8 > &buffer) | |
const std::vector< nap::uint8 > & | data () const |
size_t | size () const |
std::string | toString () const |
Sent to an endpoint by an UDPClient or created by the UDPServer upon receiving data. Light object that can be copied and moved.
|
default |
|
noexcept |
UDPPacket constructor copies the contents of string into buffer
UDPPacket | ( | std::vector< nap::uint8 > && | buffer | ) |
UDPPacket constructor moves the contents of supplied buffer if rvalue
buffer | the buffer to be copied |
UDPPacket | ( | const std::vector< nap::uint8 > & | buffer | ) |
UDPPacket constructor copies the contents of supplied buffer
buffer | the buffer to be copied |
const std::vector<nap::uint8>& data | ( | ) | const |
returns const reference to vector holding data
size_t size | ( | ) | const |
returns size of data buffer
std::string toString | ( | ) | const |