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

Function Receive

engine/dlib/src/dlib/socket_win32.cpp:557–571  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls 1

NativeToResultCompatFunction · 0.70

Tested by

no test coverage detected