MCPcopy Create free account
hub / github.com/F-Stack/f-stack / recv

Function recv

adapter/micro_thread/mt_sys_hook.cpp:248–263  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

246}
247
248ssize_t recv(int fd, void *buffer, size_t length, int flags)
249{
250 mt_hook_syscall(recv);
251 MtHookFd* hook_fd = mt_hook_find_fd(fd);
252 if (!mt_hook_active() || !hook_fd || !ff_hook_active())
253 {
254 return mt_real_func(recv)(fd, buffer, length, flags);
255 }
256
257 if (hook_fd->sock_flag & MT_FD_FLG_UNBLOCK)
258 {
259 return ff_hook_recv(fd, buffer, length, flags);
260 }
261
262 return MtFrame::recv(fd, buffer, length, flags, hook_fd->read_timeout);
263}
264
265ssize_t send(int fd, const void *buf, size_t nbyte, int flags)
266{

Callers 2

mt_tcp_check_recvFunction · 0.70
mt_recvFunction · 0.70

Calls 2

mt_hook_find_fdFunction · 0.85
ff_hook_recvFunction · 0.70

Tested by

no test coverage detected