MCPcopy Create free account
hub / github.com/GarageGames/Torque3D / netSocketWaitForWritable

Function netSocketWaitForWritable

Engine/source/platform/platformNet.cpp:576–592  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

574}
575
576bool netSocketWaitForWritable(NetSocket handleFd, S32 timeoutMs)
577{
578 fd_set writefds;
579 timeval timeout;
580 SOCKET socketFd = PlatformNetState::smReservedSocketList.resolve(handleFd);
581
582 FD_ZERO( &writefds );
583 FD_SET( socketFd, &writefds );
584
585 timeout.tv_sec = timeoutMs / 1000;
586 timeout.tv_usec = ( timeoutMs % 1000 ) * 1000;
587
588 if( select(socketFd + 1, NULL, &writefds, NULL, &timeout) > 0 )
589 return true;
590
591 return false;
592}
593
594bool Net::init()
595{

Callers 1

processMethod · 0.85

Calls 1

resolveMethod · 0.45

Tested by

no test coverage detected