mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-15 17:59:58 +00:00
copy fragment faster
This commit is contained in:
parent
5f1c599f81
commit
8c555fe592
@ -33,7 +33,7 @@ namespace tunnel
|
|||||||
struct Fragment
|
struct Fragment
|
||||||
{
|
{
|
||||||
Fragment (bool last, uint64_t t, const uint8_t * buf, size_t size):
|
Fragment (bool last, uint64_t t, const uint8_t * buf, size_t size):
|
||||||
isLastFragment (last), receiveTime (t), data (buf, buf + size) {};
|
isLastFragment (last), receiveTime (t), data (size) { memcpy (data.data(), buf, size); };
|
||||||
bool isLastFragment;
|
bool isLastFragment;
|
||||||
uint64_t receiveTime; // milliseconds since epoch
|
uint64_t receiveTime; // milliseconds since epoch
|
||||||
std::vector<uint8_t> data;
|
std::vector<uint8_t> data;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user