Skip to content

Commit 8f6e9ad

Browse files
tcp: Redefined bind, now called listen. Support for multiple source IPs
1 parent e508d40 commit 8f6e9ad

7 files changed

Lines changed: 354 additions & 107 deletions

File tree

api/net/inet_common.hpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,10 @@ namespace net {
107107
static constexpr uint16_t USER_START {1024};
108108
static constexpr uint16_t USER_END {49151};
109109
static constexpr uint16_t DYNAMIC_START {49152};
110-
static constexpr uint16_t DYNAMIC_END {65534}; // 65535 never assigned
110+
static constexpr uint16_t DYNAMIC_END {65535}; // 65535 should never be assigned
111+
112+
static constexpr bool is_dynamic(const uint16_t port) noexcept
113+
{ return port > USER_END; }
111114
}
112115

113116
/**

0 commit comments

Comments
 (0)