(struct sockaddr*)&ss, &socklen);if(new_fd <0)break;if(!(lev->flags & LEV_OPT_LEAVE_SOCKETS_BLOCKING))evutil_make_socket_nonblocking(new_fd);
evutil_make_socket_nonblocking(nw->socks[0]); evutil_make_socket_nonblocking(nw->socks[1]); nw->evsock = event_new(nw->base, nw->socks[0], EV_READ, neuworker_sockcb, nw);if(nw->evsock ==NULL){ event_base_free(nw->base); evutil_closesocket(nw->socks[0]); evutil_closesocket...
Security Insights Additional navigation options Files e5302ac bufferevent_sock.c changelist-internal.h configure.ac defer-internal.h devpoll.c epoll.c epoll_sub.c epolltable-internal.h evbuffer-internal.h evconfig-private.h.cmake evconfig-private.h.in ...
* to make the socket nonblocking or close-on-exec with as few syscalls as * possible. */evutil_socket_tsocket_with_flags(intdomain,inttype,intprotocol) {evutil_socket_tr;#ifdefined(SOCK_NONBLOCK) && defined(SOCK_CLOEXEC)r = socket(domain, type, protocol);if(r >=0)returnr;elseif((typ...
evutil_make_socket_nonblocking(new_fd);if(lev->cb ==NULL) { UNLOCK(lev);return; } ++lev->refcnt; cb = lev->cb; user_data = lev->user_data; UNLOCK(lev); cb(lev, new_fd, (struct sockaddr*)&ss, (int)socklen, user_data); ...
evutil_make_socket_nonblocking(new_fd);if(lev->cb ==NULL) { UNLOCK(lev);return; } ++lev->refcnt; cb = lev->cb; user_data = lev->user_data; UNLOCK(lev); cb(lev, new_fd, (struct sockaddr*)&ss, (int)socklen, user_data); ...