MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / addPolledSocket

Function addPolledSocket

Engine/source/platform/platformNet.cpp:514–527  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

512static Vector<PolledSocket*> gPolledSockets( __FILE__, __LINE__ );
513
514static PolledSocket* addPolledSocket(NetSocket handleFd, SOCKET fd, S32 state,
515 char* remoteAddr = NULL, S32 port = -1)
516{
517 PolledSocket* sock = new PolledSocket();
518 sock->fd = fd;
519 sock->handleFd = handleFd;
520 sock->state = state;
521 if (remoteAddr)
522 dStrcpy(sock->remoteAddr, remoteAddr, 256);
523 if (port != -1)
524 sock->remotePort = port;
525 gPolledSockets.push_back(sock);
526 return sock;
527}
528
529bool netSocketWaitForWritable(NetSocket handleFd, S32 timeoutMs)
530{

Callers 3

openListenPortMethod · 0.85
openConnectToMethod · 0.85
processMethod · 0.85

Calls 2

dStrcpyFunction · 0.85
push_backMethod · 0.45

Tested by

no test coverage detected