Luanti 5.10.0-dev
 
Loading...
Searching...
No Matches
TestSocket Class Reference
+ Inheritance diagram for TestSocket:
+ Collaboration diagram for TestSocket:

Public Member Functions

 TestSocket ()
 
const char * getName ()
 
void runTests (IGameDef *gamedef)
 
void testIPv4Socket ()
 
void testIPv6Socket ()
 
- Public Member Functions inherited from TestBase
bool testModule (IGameDef *gamedef)
 
std::string getTestTempDirectory ()
 
std::string getTestTempFile ()
 
void runTest (const char *name, std::function< void()> &&test)
 

Static Public Attributes

static const int port = 30003
 

Additional Inherited Members

- Public Attributes inherited from TestBase
u32 num_tests_failed
 
u32 num_tests_run
 

Constructor & Destructor Documentation

◆ TestSocket()

TestSocket::TestSocket ( )
inline

References INTERNET_SIMULATOR, and TestManager::registerTestModule().

+ Here is the call graph for this function:

Member Function Documentation

◆ getName()

const char * TestSocket::getName ( )
inlinevirtual

Implements TestBase.

◆ runTests()

void TestSocket::runTests ( IGameDef * gamedef)
virtual

Implements TestBase.

References g_settings, Settings::getBool(), TEST, testIPv4Socket(), and testIPv6Socket().

+ Here is the call graph for this function:

◆ testIPv4Socket()

void TestSocket::testIPv4Socket ( )

References UDPSocket::Bind(), g_settings, Settings::get(), Address::getAddress(), Address::isIPv6(), port, UDPSocket::Receive(), Address::Resolve(), UDPSocket::Send(), sleep_ms, and UASSERT.

Referenced by runTests().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ testIPv6Socket()

void TestSocket::testIPv6Socket ( )

References UDPSocket::Bind(), IPv6AddressBytes::bytes, dstream, Address::getAddress6(), UDPSocket::init(), port, UDPSocket::Receive(), UDPSocket::Send(), sleep_ms, and UASSERT.

Referenced by runTests().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ port

const int TestSocket::port = 30003
static

Referenced by testIPv4Socket(), and testIPv6Socket().


The documentation for this class was generated from the following file: