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

Function write

adapter/micro_thread/mt_sys_hook.cpp:193–208  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

191}
192
193ssize_t write(int fd, const void *buf, size_t nbyte)
194{
195 mt_hook_syscall(write);
196 MtHookFd* hook_fd = mt_hook_find_fd(fd);
197 if (!mt_hook_active() || !hook_fd || !ff_hook_active())
198 {
199 return mt_real_func(write)(fd, buf, nbyte);
200 }
201
202 if (hook_fd->sock_flag & MT_FD_FLG_UNBLOCK)
203 {
204 return ff_hook_write(fd, buf, nbyte);
205 }
206
207 return MtFrame::write(fd, buf, nbyte, hook_fd->write_timeout);
208}
209
210ssize_t sendto(int fd, const void *message, size_t length, int flags,
211 const struct sockaddr *dest_addr, socklen_t dest_len)

Callers 6

mt_writeFunction · 0.70
loopFunction · 0.50
loopFunction · 0.50
loopFunction · 0.50
loopFunction · 0.50
loopFunction · 0.50

Calls 2

mt_hook_find_fdFunction · 0.85
ff_hook_writeFunction · 0.70

Tested by

no test coverage detected