MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / krecv

Function krecv

source/kernel/ksocket.cpp:223–234  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

221}
222
223U32 krecv(KThread* thread, U32 socket, U32 buffer, U32 len, U32 flags) {
224 KFileDescriptorPtr fd = thread->process->getFileDescriptor(socket);
225
226 if (!fd) {
227 return -K_EBADF;
228 }
229 if (IS_NOT_SOCKET(fd)) {
230 return -K_ENOTSOCK;
231 }
232 std::shared_ptr<KSocketObject> s = std::dynamic_pointer_cast<KSocketObject>(fd->kobject);
233 return s->recvfrom(thread, fd, buffer, len, flags, 0, 0);
234}
235
236U32 kshutdown(KThread* thread, U32 socket, U32 how) {
237 KFileDescriptorPtr fd = thread->process->getFileDescriptor(socket);

Callers 1

syscall_socketcallFunction · 0.85

Calls 2

getFileDescriptorMethod · 0.80
recvfromMethod · 0.45

Tested by

no test coverage detected