| 555 | } |
| 556 | |
| 557 | Result Receive(Socket socket, void* buffer, int length, int* received_bytes) |
| 558 | { |
| 559 | *received_bytes = 0; |
| 560 | int r = recv(socket, (char*)buffer, length, 0); |
| 561 | |
| 562 | if (r < 0) |
| 563 | { |
| 564 | return NativeToResultCompat(DM_SOCKET_ERRNO); |
| 565 | } |
| 566 | else |
| 567 | { |
| 568 | *received_bytes = r; |
| 569 | return RESULT_OK; |
| 570 | } |
| 571 | } |
| 572 | |
| 573 | Result ReceiveFrom(Socket socket, void* buffer, int length, int* received_bytes, Address* from_addr, uint16_t* from_port) |
| 574 | { |
nothing calls this directly
no test coverage detected