MCPcopy Create free account
hub / github.com/defold/defold / SetSockoptTime

Function SetSockoptTime

engine/dlib/src/dlib/socket_win32.cpp:724–741  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

722 }
723
724 static Result SetSockoptTime(Socket socket, int level, int name, uint64_t time)
725 {
726 DWORD timeval = time / 1000;
727 if (time > 0 && timeval == 0)
728 {
729 dmLogWarning("Socket timeout requested less than 1ms. Timeout set to 1ms.");
730 timeval = 1;
731 }
732 int ret = setsockopt(socket, level, name, (char*)&timeval, sizeof(timeval));
733 if (ret < 0)
734 {
735 return NATIVETORESULT(DM_SOCKET_ERRNO);
736 }
737 else
738 {
739 return RESULT_OK;
740 }
741 }
742
743 Result SetSendTimeout(Socket socket, uint64_t timeout)
744 {

Callers 2

SetSendTimeoutFunction · 0.70
SetReceiveTimeoutFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected