| 263 | } |
| 264 | |
| 265 | ssize_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 | |
| 282 | int setsockopt(int fd, int level, int option_name, const void *option_value, socklen_t option_len) |
| 283 | { |
no test coverage detected