- minbase_identify will now check for _GAMING_XBOX_XBOXONE and
_GAMING_XBOX_SCARLETT. (And also _GAMING_XBOX)
- Added IsXboxScarlett() and IsXbox()
- A few places in the low level code need to be tweaked based on IsXbox()
instead of _XBOX_ONE
- Added IsIOS() and IsTVOS()
Deleted some code that was disabling warnings, I don't think it's needed
anymore.
Tweak defines in CSteamNetworkingUtils::GetPlatformString
PS4/PS5 need Microsoft-style __declspec(dllexport)
P4:7324318
They insist on using "enum class" and making their parallel version of
Berkely sockets, and I am 100% confident that literally not one single
person actually wants this.
P4:7324300
Replace a bunch of non-standard defines with standard ones
Don't #define POSIX in public header or test for it. Fixes#228.
(We shoulkd probably also make this change to Steamworks headers.)
Use IsLinux(), IsPosix(), etc instead of #ifdef LINUX or #ifdef POSIX
Moved some platform socket stuff out of steamnetworkingsockets_platform.h
and into platform_sockets.h. (none of this is actually particular to
steamnetworkingsockets.)
Some platforms don't have IPv6 support.
Remove asserts in OpenSSL EVP implemtnation of CEC25519KeyBase::Wipe. We
might have a raw copy, and that's OK.
(This change was needed to fix some bugs in code that is not part of the
opensource code.)
P4:7307240
Fix bug in SteamNetworkingSockets::InternalSetCertificate incorrectly assuming
that GetRawDataPtr was always available. It only works for some crypto
implementations.
P4: 7307233
This is so that derived classes can use them more easily. (Specifically, to
be able to set the raw buffer without the virtual Wipe() being called.)
Also: WIPE NEEDS TO SECURELY WIPE, not just free the buffer!
P4:7307228
This is to enable cacfhing of certificates and relay tickets to a durable
cache, especially on consoles.
- InternalClearIdentity is virtual, this will give the SDR class a chance
to nuke any existing tickets when we reset our identity.
- Added InternalOnGotIdentity
- Refactored SetCertificate and added some flags so that we can control
how it interacts with the cache. Things can get a bit tangled because
in some sitautions the certificate is how we learn what our identity
is.
P4:7307221
When looking up connections by their handle, take both the table and the connection
lock using a timeout. If we fail, release both locks and start all over.
This will proptect against a deadlock if we take the locks in the opposite order.
We currently don't ever encounter this situation solely within this library. However,
we did come across a case with P2P callbacks calling into a custom signal handler.
We could probably fix the custom signal handler to not do this, but it seems like
there are going to be other edge cases, and this change is low risk because contention
is low and most lock attempts will succeed immediately. And deadlocks are very
hard to reproduce and debug.
CR:saml
P4:7307214
If not enabled don't use dynamic_cast. (We only use it for certain debugging
checks.)
It is important to me that you be able to use this lib without RTTI enabled.
p4:7246870
ENABLE_ICE means "enable any ICE support, including the native client"
and is on by default. (Because the native client is not much code.)
Try to build the trivial_signling_server if we are building either
examples or tests, and ENABLE_ICE is set. The P2P test needs it.
The basic problem was that we were using m_statsEndToEnd.m_nMaxRecvPktNum
for two purposes:
- The highest numbered we have received, for purposes of jitter calculations
and duplicate packet rejection.
- The highest numbered packet we want to ack.
But if we decide to drop a packet (to protect against a malicious sender, etc)
and intentionally not ack it, these values won't be the same! This means we
might be acking packets that we did not actually process! Fortunately, it only
happened if the fragmentation was extremely high, which only happens when there
is extrenely high packet loss. Also, only certain cases of "don't ack this"
can cause any problems other than asserts.
The "soak" connection test has been detecting this bug for a while, but I
haven't had a chance to investigate, since it only triggered underly insanely
high packet loss (whichthe test simulates). But now the soak test passes,
which....is good!
With this change, the role of m_statsEndToEnd.m_nMaxRecvPktNum is only for
duplicate detection. We track the highest numbered packet that we wish to ack
in the sentinel in m_receiverState.m_mapPacketGaps. The time when that packet
was received will also be tracked there. This change actually simplified some
code.
One more change: how we protect against a malicious sender causing our packet gap
map to be too large. When we go to add a new gap, previously if we were already
at the max, we would immediately abort the function. Now, we move the handling
of "too many gaps" to be later in the function, and we try to select the "best"
gap to erase, with the goal of minimizing the degregation (very possibly none)
caused by us starting to nack a block of packets that were actually received
(and in fact perhaps previousally acked).
P4:7219136
If there's a packet number lurch and we reset the last received packet
number, we should mark the time when it was received. Otherwise our
jitter calculations will be off
P4:7219094
Deleted several places where we were using this pattern:
<platform 1 code>
<platform 2 code>
... etc
This is a pain when you have some platforms that are under NDA and you
cannot share the code. Instead I introduced some abstractions that made
it possible to move all of the platform-specific code (at least for NDA
platforms, which are my primary concern right now) to a separate file.
This way, we can just exclude particular files from distribution, rather
that have files that actually differ.
Also changed some platform-defines to more "functional" defines (USE_POLL,
USE_EPOLL, WAKE_THREAD_USING_EVENT, WAKE_THREAD_USING_SOCKET_PAIR) that
make it clear the reason for the #ifdef. This also means on platforms
that support multiple methods (e.g. Linux) we could switch those options.
Finally, renamed a few things with "SteamDatagram" in the name to
"SteamNetworkingSockets". I'm trying to have "datagram" refer exclusively
to the relay network, which is only available to Steam partners, and
thus in general should not be present in the opensource code.
P4:7219053,7219056,7219071
Don't #define or check for GAME_CONSOLE. That's what IsConsole() is for.
Add PS5 defines, add a few PS5 tweaks
Delete some PS3/Xbox360 stuff
P4:7219035
This is a fine change and all, probably a small optimization.
The real reason to do it is to make the PS5 port easier.
I have to admit that it totally worked the very first time, which
is kind of scary -- obviously something is deeply broken. If so,
it is possible to switch back to regular polling by just defining
USE_POLL instead of USE_EPOLL
P4:7194744,7194845,7194874
Added some comments that clarify the rules around which locks must be held
to access which objects.
Added assertions to verify the appropriate locks are held, and provide better
feedback if a particular step takes a long time.
Move the sending of the initial auth message into shared code.
Deleted some code that was checking for a NULL m_pICESession. That shoud
never happen based on the lifetimes of these objects. It definitely
indicates a bug and I think it's fine to crash if it happens.
P4:7194292
ICE should always use ephemeral ports. Binding to particular local ports
doesn't really make any sense. This was originally added as a result of some
confusion regarding what "virtual ports" for for.
P4:7194241
Move the generation of the ICESessionConfig into the common P2P code, since
none of it was specific to WebRTC.
Still need to do some refactoring of the Valve client, but checking in this
checkpoint as the code is working again.
Also, I'm aware that I have lost the configuration of the TURN servers.
Will add that back after I'm done with this big merge and refactor. I hit
some merge conflicts.
P4:7194237
Split out WebRTC ICE client implementation into its own file.
Split out some ICE-related types that we want to share between any ICE client
into ice_client_types.h. The goal here is to have our own client and the
WebRTC client have a similar setup interface.
P4:7194217,7194221,7194235