Skip to content

Commit

Permalink
Solved TODO
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianReimold committed Mar 19, 2024
1 parent 0657dbb commit b8e7616
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ecaludp/src/protocol/datagram_builder_v5.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ namespace ecaludp

DatagramList create_datagram_list(const std::vector<asio::const_buffer>& buffer_sequence, size_t max_datagram_size, std::array<char, 4> magic_header_bytes)
{
// TODO: Complain when the max_udp_datagram_size is too small (the header doesn't even fit)
// Complain when the max_udp_datagram_size is too small (the header doesn't even fit)
if (max_datagram_size <= sizeof(ecaludp::v5::Header))
{
throw std::invalid_argument("max_datagram_size is too small");
}

constexpr size_t header_size = sizeof(ecaludp::v5::Header);

Expand Down

0 comments on commit b8e7616

Please sign in to comment.