Skip to content

Commit

Permalink
copy fragment faster
Browse files Browse the repository at this point in the history
  • Loading branch information
orignal committed Jan 14, 2025
1 parent 5f1c599 commit 8c555fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libi2pd/TunnelEndpoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ namespace tunnel
struct Fragment
{
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;
uint64_t receiveTime; // milliseconds since epoch
std::vector<uint8_t> data;
Expand Down

0 comments on commit 8c555fe

Please sign in to comment.