MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / ff_accept

Function ff_accept

libavformat/network.c:225–241  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

223}
224
225int ff_accept(int fd, int timeout, URLContext *h)
226{
227 int ret;
228 struct pollfd lp = { fd, POLLIN, 0 };
229
230 ret = ff_poll_interrupt(&lp, 1, timeout, &h->interrupt_callback);
231 if (ret < 0)
232 return ret;
233
234 ret = accept(fd, NULL, NULL);
235 if (ret < 0)
236 return ff_neterrno();
237 if (ff_socket_nonblock(ret, 1) < 0)
238 av_log(h, AV_LOG_DEBUG, "ff_socket_nonblock failed\n");
239
240 return ret;
241}
242
243int ff_listen_bind(int fd, const struct sockaddr *addr,
244 socklen_t addrlen, int timeout, URLContext *h)

Callers 2

ff_listen_bindFunction · 0.85
tcp_acceptFunction · 0.85

Calls 4

ff_poll_interruptFunction · 0.85
ff_neterrnoFunction · 0.85
ff_socket_nonblockFunction · 0.85
av_logFunction · 0.85

Tested by

no test coverage detected