| 575 | const int k_nStartingServerPort = 27200; |
| 576 | |
| 577 | static void Test_quick() |
| 578 | { |
| 579 | uint16 nServerPort = k_nStartingServerPort; |
| 580 | SteamNetworkingIPAddr bindAddr, connectAddr; |
| 581 | |
| 582 | // |
| 583 | // First, do some 'cursory' connection tests between various combiantions of IPv4, IPc6, and dual-stack. |
| 584 | // This is really just to make sure we can connect and exchange packets. |
| 585 | // |
| 586 | |
| 587 | // IPv4-only server, IPv4 client |
| 588 | bindAddr.SetIPv4( 0, nServerPort ); |
| 589 | connectAddr.SetIPv4( 0x7f000001, nServerPort ); |
| 590 | Test_Connection( ETestConnectionMode::Cursory, bindAddr, connectAddr ); |
| 591 | ++nServerPort; |
| 592 | |
| 593 | // IPv6-only server, IPv6 client |
| 594 | bindAddr.SetIPv6LocalHost( nServerPort ); |
| 595 | connectAddr.SetIPv6LocalHost( nServerPort ); |
| 596 | Test_Connection( ETestConnectionMode::Cursory, bindAddr, connectAddr ); |
| 597 | ++nServerPort; |
| 598 | |
| 599 | // Dual-stack server, IPv6 client |
| 600 | bindAddr.Clear(); bindAddr.m_port = nServerPort; |
| 601 | connectAddr.SetIPv6LocalHost( nServerPort ); |
| 602 | Test_Connection( ETestConnectionMode::Cursory, bindAddr, connectAddr ); |
| 603 | ++nServerPort; |
| 604 | |
| 605 | // |
| 606 | // Now do a 'normal' test |
| 607 | // |
| 608 | // Dual-stack server, IPv4 client (IPv4-mapped path) |
| 609 | bindAddr.Clear(); bindAddr.m_port = nServerPort; |
| 610 | connectAddr.SetIPv4( 0x7f000001, nServerPort ); |
| 611 | Test_Connection( ETestConnectionMode::Normal, bindAddr, connectAddr ); |
| 612 | } |
| 613 | |
| 614 | static void Test_soak() |
| 615 | { |
nothing calls this directly
no test coverage detected