Skip to content
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.

Commit

Permalink
quic: add misc comment
Browse files Browse the repository at this point in the history
PR-URL: #31
  • Loading branch information
jasnell committed Aug 19, 2019
1 parent c59a18a commit f037cbb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/node_quic_session.cc
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ void QuicSessionConfig::Set(
env->quic_state()->quicsessionconfig_buffer;
uint64_t flags = buffer[IDX_QUIC_SESSION_CONFIG_COUNT];

// The following might be non-obvious. The QUICSESSION_CONFIG macro defines
// the set of numeric configuration values for the QuicSessionConfig. They
// are defined this way to avoid code duplicate in a couple of places. The
// following macro expands out to set each member value in the QuicSessionConfig
// to the corresponding value in the AliasedBuffer
#define V(idx, name, def) \
if (flags & (1 << IDX_QUIC_SESSION_##idx)) \
name##_ = static_cast<uint64_t>(buffer[IDX_QUIC_SESSION_##idx]);
Expand Down

0 comments on commit f037cbb

Please sign in to comment.