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

Function netSocketWaitForWritable

engine/source/platform/platformNet.cpp:549–565  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

547}
548
549bool netSocketWaitForWritable(NetSocket handleFd, S32 timeoutMs)
550{
551 fd_set writefds;
552 timeval timeout;
553 SOCKET socketFd = PlatformNetState::smReservedSocketList.resolve(handleFd);
554
555 FD_ZERO( &writefds );
556 FD_SET( socketFd, &writefds );
557
558 timeout.tv_sec = timeoutMs / 1000;
559 timeout.tv_usec = ( timeoutMs % 1000 ) * 1000;
560
561 if( select(socketFd + 1, NULL, &writefds, NULL, &timeout) > 0 )
562 return true;
563
564 return false;
565}
566
567bool Net::init()
568{

Callers 1

processMethod · 0.85

Calls 1

resolveMethod · 0.80

Tested by

no test coverage detected