| 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 | { |
no outgoing calls
no test coverage detected