summaryrefslogtreecommitdiff
path: root/node/Packet.hpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2015-04-07 19:31:11 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2015-04-07 19:31:11 -0700
commit49f031ccb4d518e8a715777f5d848759bae0def8 (patch)
tree6f5d2fe9a753d36ac1da657142fc50645804466d /node/Packet.hpp
parent9e55f882d3ca5a5615c21ebaec0702aaaf436e2b (diff)
downloadinfinitytier-49f031ccb4d518e8a715777f5d848759bae0def8.tar.gz
infinitytier-49f031ccb4d518e8a715777f5d848759bae0def8.zip
Tons of refactoring, change to desperation algorithm to use max of core or link, porting over core loop code from old Node.cpp to new CAPI version, etc.
Diffstat (limited to 'node/Packet.hpp')
-rw-r--r--node/Packet.hpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/node/Packet.hpp b/node/Packet.hpp
index 20a5b145..d79ba2bd 100644
--- a/node/Packet.hpp
+++ b/node/Packet.hpp
@@ -361,6 +361,11 @@ public:
{
}
+ Fragment(const void *data,unsigned int len) :
+ Buffer<ZT_PROTO_MAX_PACKET_LENGTH>(data,len)
+ {
+ }
+
/**
* Initialize from a packet
*
@@ -793,12 +798,16 @@ public:
throw();
template<unsigned int C2>
- Packet(const Buffer<C2> &b)
- throw(std::out_of_range) :
+ Packet(const Buffer<C2> &b) :
Buffer<ZT_PROTO_MAX_PACKET_LENGTH>(b)
{
}
+ Packet(const void *data,unsigned int len) :
+ Buffer<ZT_PROTO_MAX_PACKET_LENGTH>(data,len)
+ {
+ }
+
/**
* Construct a new empty packet with a unique random packet ID
*