24 Commits

Author SHA1 Message Date
Fletcher Dunn ea9c4ade95 test_p2p.cpp now understands --turn-server 2026-05-27 08:33:55 -07:00
Fletcher Dunn 19fd53901c test_p2p now supports --repeat 2026-05-22 21:26:57 -07:00
Fletcher Dunn 3060bfd781 Add IPv6 support to p2p mock framework 2026-05-18 00:05:26 -07:00
Fletcher Dunn 7515a9e00c test_p2p now deliberately selects ICE implementation
Our implementation honors the mock network.  We know that webrtc has
their own very robust mocking framework they put their own implementation
through.
2026-05-17 22:29:48 -07:00
Fletcher Dunn d790bd66e2 Improve P2P mocking framework
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.
2026-05-17 20:01:31 -07:00
Fletcher Dunn 0e18b7dd57 Confirm route type in p2p test
p2p_test.cpp will print the route type
The runner script will extract it and check that the route type is what
we expect
2026-05-13 22:12:22 -07:00
Fletcher Dunn eb25f201c1 test_p2p: Add option to set stun server 2026-05-13 22:12:21 -07:00
Fletcher Dunn 2cb87c1c82 test_p2p.exe: add command line args to setup mock network 2026-05-13 22:12:21 -07:00
Fletcher Dunn 1ca37d421b Add framework for setting a mock network environment 2026-05-13 22:12:20 -07:00
Fletcher Dunn 4c75e51da0 test_p2p: add --loglevel-p2prendezvous 2026-04-20 22:19:04 -07:00
Fletcher Dunn 62f86f63b3 test_p2p can now adjust the spew level
We'll want CI to print detailed info to stdio
2026-04-20 22:18:50 -07:00
Fletcher Dunn ea429d4540 Better logging for P2P tests
P4:8088395
2023-05-28 19:06:31 -07:00
Levent 30ec24294f TURN server configuration implemented. 2021-10-04 11:56:22 -07:00
Fletcher Dunn a0f7110104 Fix compiler warnings in test_p2p
P4:6653437
2021-07-06 15:35:34 -07:00
Fletcher Dunn ae52d2d0ce Refactor custom signaling
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.)
2020-10-16 15:08:16 -07:00
Fletcher Dunn 22dbfad386 Add printf 2020-10-12 12:00:08 -07:00
Fletcher Dunn a419be3d1f Fix win32 compile 2020-09-02 20:21:04 -07:00
Fletcher Dunn 7bbb617cdd Finish P2P test
Have the clients exchange a message or two and then close the connection
gracefully.

I think this is good enough to claim victory on issue #133!
2020-09-02 11:30:00 -07:00
Fletcher Dunn b3350635fa Add/tweak spew 2020-09-02 09:57:21 -07:00
Fletcher Dunn d068d47264 Configure test to use google public STUN servers 2020-09-01 17:26:22 -07:00
Fletcher Dunn 2105b69b46 Improve P2P test.
Bail test when connection is closed.
Increase spew level for P2P-related stuff.
Added asserts
2020-09-01 15:29:26 -07:00
Fletcher Dunn 6c8dfe5fbc Use custom signaling path to connect 2020-09-01 06:23:52 -07:00
Fletcher Dunn b81bdd6ac7 P2P test mostly written.
I really need to be able to compile the webrtc code with my version
of cmake to make further progress on this.
2020-08-31 14:57:40 -07:00
Fletcher Dunn 1205aa893b Start P2P test. WIP.
Moved some common stuff out of test_connection.cpp to test_common.cpp.
2020-08-31 10:55:26 -07:00