MCPcopy Create free account
hub / github.com/axboe/liburing / set_client_fd

Function set_client_fd

test/accept.c:210–228  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

208}
209
210static int set_client_fd(struct sockaddr_in *addr)
211{
212 int32_t val;
213 int fd, ret;
214
215 fd = socket(AF_INET, SOCK_STREAM | SOCK_CLOEXEC, IPPROTO_TCP);
216
217 val = 1;
218 ret = setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &val, sizeof(val));
219 assert(ret != -1);
220
221 t_set_nonblock(fd);
222
223 ret = connect(fd, (struct sockaddr *)addr, sizeof(*addr));
224 assert(ret == -1);
225
226 t_clear_nonblock(fd);
227 return fd;
228}
229
230static void cause_overflow(struct io_uring *ring)
231{

Callers 1

test_loopFunction · 0.85

Calls 2

t_set_nonblockFunction · 0.85
t_clear_nonblockFunction · 0.85

Tested by 1

test_loopFunction · 0.68