MCPcopy Create free account
hub / github.com/decoder-it/ADCSCoercePotato / checkForNewConnection

Function checkForNewConnection

ADCSCoercePotato.cpp:170–182  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

168
169
170int checkForNewConnection(SOCKET* ListenSocket, SOCKET* ClientSocket) {
171 fd_set readSet;
172 FD_ZERO(&readSet);
173 FD_SET(*ListenSocket, &readSet);
174 timeval timeout;
175 timeout.tv_sec = 1; // Zero timeout (poll)
176 timeout.tv_usec = 0;
177 if (select(*ListenSocket, &readSet, NULL, NULL, &timeout) == 1) {
178 *ClientSocket = accept(*ListenSocket, NULL, NULL);
179 return 1;
180 }
181 return 0;
182}
183
184int PotatoAPI::triggerDCOM(void)
185{

Callers 1

startCOMListenerMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected