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

Function connect

adapter/micro_thread/mt_sys_hook.cpp:159–174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

157}
158
159int connect(int fd, const struct sockaddr *address, socklen_t address_len)
160{
161 mt_hook_syscall(connect);
162 MtHookFd* hook_fd = mt_hook_find_fd(fd);
163 if (!mt_hook_active() || !hook_fd || !ff_hook_active())
164 {
165 return mt_real_func(connect)(fd, address, address_len);
166 }
167
168 if (hook_fd->sock_flag & MT_FD_FLG_UNBLOCK)
169 {
170 return ff_hook_connect(fd, address, address_len);
171 }
172
173 return MtFrame::connect(fd, address, (int)address_len, hook_fd->write_timeout);
174}
175
176ssize_t read(int fd, void *buf, size_t nbyte)
177{

Callers 5

mt_tcpsendrcvFunction · 0.70
mt_tcpsendrcv_shortFunction · 0.70
mt_tcpsendFunction · 0.70
mt_tcpsend_shortFunction · 0.70
mt_connectFunction · 0.70

Calls 2

mt_hook_find_fdFunction · 0.85
ff_hook_connectFunction · 0.70

Tested by

no test coverage detected