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

Function addPolledSocket

engine/source/platform/platformNet.cpp:534–547  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

532static Vector<PolledSocket*> gPolledSockets( __FILE__, __LINE__ );
533
534static PolledSocket* addPolledSocket(NetSocket handleFd, SOCKET fd, S32 state,
535 char* remoteAddr = NULL, S32 port = -1)
536{
537 PolledSocket* sock = new PolledSocket();
538 sock->fd = fd;
539 sock->handleFd = handleFd;
540 sock->state = state;
541 if (remoteAddr)
542 dStrcpy(sock->remoteAddr, remoteAddr);
543 if (port != -1)
544 sock->remotePort = port;
545 gPolledSockets.push_back(sock);
546 return sock;
547}
548
549bool netSocketWaitForWritable(NetSocket handleFd, S32 timeoutMs)
550{

Callers 3

openListenPortMethod · 0.85
openConnectToMethod · 0.85
processMethod · 0.85

Calls 2

dStrcpyFunction · 0.50
push_backMethod · 0.45

Tested by

no test coverage detected