Removed the word "custom" from the namesofinterfacesthatwerealreadyverylong.
Added k_ESteamNetworkingConfig_Callback_CreateConnectionSignaling, which is
a mechanism for connections that require signaling to be iniated locally.
This is used by ISteamnetwrokingSockets::ConnectP2P and connections created
using the ISteamNetworkingMessages interface....which has been added.
These changes address issue #137 and bring the opensource code more in
line with Steamworks version.
Delete the define STEAMNETWORKINGSOCKETS_HAS_DEFAULT_P2P_SIGNALING. "Default
signaling" is a thing that can exist on any platform, and can only be determined
at runtime. Most places that were using this actually should have been
checking STEAMNETWORKINGSOCKETS_ENABLE_STEAMNETWORKINGMESSAGES anyway, and
those two defines were equivalent in practice.
STEAMNETWORKINGSOCKETS_ENABLE_STEAMNETWORKINGMESSAGES will be defined by default.
I could add a mechanism to disable it if anybody is relaly concerned about
code size.
(Also started some refactoring of the P2P listen sockets, to merge them
with hosted dedicated server listen sockets. The goal is to enable a
way to connected to hosted dedicated servers without tickets. That is a work
in progress, and also not relevant to the opensource code.)
* Fixed installation with WebRTC is enabled
* Added vcpkg feature option for webrtc
* Try to detect abseil before using our own submodule copy (means we can use the one from vcpkg)
* Fixed standalone example build
* Shaved down abseil dependencies and use properly namespaced names
I don't want to learn or maintain two build systems. cmake is the javascript
of cross-platform build systems: Yes, it's weird and old and crusty and you
can point out all sorts of problems with it. But it's also what the
community is consolidating on.
WIP. This compiles but hasn't been tested yet. Working on a test case
that exercises it.
Also I'm still not sure I like the way the interfaces are organized. It's
slightly more complicated than necessary, to handle what is probably a
relatively rare use case. Maybe the only use case I care about is "Here
is the one and only signaling service to use" and I could essentially
combine ISteamNetworkingCustomSignalingRecvContext and
ISteamNetworkingCustomSignalingService. You could replace the default
platform service, but not mix and match.
Or maybe the only thing that is needed is some comments clarifying
the relationship between ISteamNetworkingCustomSignalingRecvContext
and ISteamNetworkingCustomSignalingService. In both cases, the primary
purpose is to create a signaling session for a specific connection. But
one is for remotely initiated connections (a signal that respresents a
connect request coming in) and the other is for locally-initated
requests that do not go through ConnectP2PCustomSignaling.
It has a really dumb client protocol, no authentication, etc. But
it should be sufficient to illustrate how a plugin for a real signaling
service (maybe XMPP or DERP) could be written.
Now you can register standard function pointers, instead of deriving
from a special class. This means that Steam and the opensource code
can now work the same, so this fixed issue #124
This is used to poll many connections in a single function call. Previously,
this was only possible if all of the connections were those accepted on the
same listen socket. (ReceiveMessagesOnListenSocket). But this left out at
least two important use cases with known users:
- If you create more than one listen socket (because there is more way to
contact your service, e.g. once for P2P and another for direct IP, and
another for relayed connections), then you could not poll all of the
connections efficiently.
- In P2P use cases, we may initiate many connections to peers, and we want
to poll all of them at once.
This change is relevant to: Issue #49, Issue #50, and issue #52. (But I don't
this it really "fixes" any of them.)
Also:
- STEAMNETWORKINGSOCKETS_STEAM now mens "running on steam", not "running using
the steam client". STEAMNETWORKINGSOCKETS_STEAMCLIENT is for that.
- Refactored stats stuff, moved it into the namespace. At one point I thought
I might expose some stuff in a public interface. For now, keeping it internal.
- Removed concept of Steam "universe" from this branch of the code.
- Don't use OVERRIDE, override works.
Moved them to ISteamNetworkingUtils, which is now actually shared Steam (mostly) with a real accessor and and interface, and not a dummy interface object with all static methods.
Connection settings have a system of inheritance, so they can be set globally, per SteamNetworkingSockets interface, per listen socket, or per connection.
Deleted the config variable to simulate fake *message* loss. That is not useful.
Introduced STEAMNETWORKINGSOCKETS_ENABLE_SDR define, to make it more clear why code is being #ifdef'ed out. (E.g. if we open-sourced that code, we would want that included.)
Replaced ESteamNetworkingSendType with a basic flags bitmask.
Cleaned up a bunch of comments.
Changed SteamNetworkingMessage_t release mechanism. Now the callback is only to free the buffer, and it's assumed that this API will manage the actual objects. (This is important because the actual type is a derived type and has extra stuff on the end.) Also laid some groundwork for user management of message objects. (Relevant for issue #51.)
Make it a method of ISteamnetworkingUtils method. This matches Steam.
Make sure ESteamNetworkingSocketsDebugOutputType is 32-bits, and declare the output callback to take an enum instead of int.
Noticed that meson was repeatedly checking the dependency, when we only
really need to do that once and use it wherever it's needed.
Signed-off-by: Steven Noonan <steven@valvesoftware.com>