MCPcopy Create free account
hub / github.com/BernardoGiordano/Checkpoint / pollSocket

Function pollSocket

3ds/source/transfer.cpp:538–546  ·  view source on GitHub ↗

Waits up to timeoutMs for `events` on sock. Returns 1 if ready, 0 on timeout, -1 on error.

Source from the content-addressed store, hash-verified

536 // Waits up to timeoutMs for `events` on sock. Returns 1 if ready, 0 on
537 // timeout, -1 on error.
538 int pollSocket(int sock, short events, int timeoutMs)
539 {
540 struct pollfd pfd;
541 pfd.fd = sock;
542 pfd.events = events;
543 pfd.revents = 0;
544 int rc = poll(&pfd, 1, timeoutMs);
545 return rc > 0 ? 1 : rc;
546 }
547
548 bool sendAll(int sock, const void* data, size_t len)
549 {

Callers 2

sendAllFunction · 0.70
sendBackupMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected