Make sure we test a super common and important scenario: two hosts
on the same LAN that *also* have the same gateway, and thus could
talk thorugh a hairpinned public route, but should use the LAN
route instead based purely on priority numbers, not latency
There can be more than one gateway. (E.g. cell connection and local
internet connection.) Each interface is assigned to one gateway,
or none of the interface is public.
Add ability to tag an adapter as non-functioning.
Simulate network latency.
Add more test cases.
The test version defines STEAMNETWORKINGSOCKETS_ENABLE_MOCK
and has internal functions tests can use to mock up network
environments (network adapters, gateway/NAT behaviour, etc)
The previous check only tested InProgress/Waiting, missing the window where
a pair is nominated but still succeeded (queued for triggered check but not
yet dequeued).
We might already have the address marked as peer reflexive.
It's probably a host address, and we want to know the 'better' type, so
that we can properly classify the route
The global state is not needed, we just use the state of individual
candidate pairs, requests, etc. It offered a small optimization, but
was mostly a place for bugs to hide.
Having it inline was a small speedup, but really not worth the ugly
macros needed to deal with tsan. (In tsan we need to make sure it
isn't expanded inline in order for the supression to work properly.)
Fix missing paren. (I bet this code has never actualy been tested.)
Add size checks in NOP LittleXxx and BigXxxx macros, so we always check
the size, not just when we need to swap.
Delete fallback if neither endian define is defined. That just hides a
potential problem.
When CMake's FindProtobuf module is used as a fallback (e.g. when building
as a git submodule without vcpkg), it creates Protobuf::libprotobuf (capital
P) rather than protobuf::libprotobuf. Add an alias so both code paths work.
This fixes#367