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

Function send

adapter/micro_thread/mt_sys_hook.cpp:265–280  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

263}
264
265ssize_t send(int fd, const void *buf, size_t nbyte, int flags)
266{
267 mt_hook_syscall(send);
268 MtHookFd* hook_fd = mt_hook_find_fd(fd);
269 if (!mt_hook_active() || !hook_fd || !ff_hook_active())
270 {
271 return mt_real_func(send)(fd, buf, nbyte, flags);
272 }
273
274 if (hook_fd->sock_flag & MT_FD_FLG_UNBLOCK)
275 {
276 return ff_hook_send(fd, buf, nbyte, flags);
277 }
278
279 return MtFrame::send(fd, buf, nbyte, flags, hook_fd->write_timeout);
280}
281
282int setsockopt(int fd, int level, int option_name, const void *option_value, socklen_t option_len)
283{

Callers 5

mt_tcpsendrcvFunction · 0.70
mt_tcpsendrcv_shortFunction · 0.70
mt_tcpsendFunction · 0.70
mt_tcpsend_shortFunction · 0.70
mt_sendFunction · 0.70

Calls 2

mt_hook_find_fdFunction · 0.85
ff_hook_sendFunction · 0.70

Tested by

no test coverage detected