| /libevent-2.1.12/ |
| H A D | minheap-internal.h | 64 void min_heap_ctor_(min_heap_t* s) { s->p = 0; s->n = 0; s->a = 0; } in min_heap_ctor_() argument 65 void min_heap_dtor_(min_heap_t* s) { if (s->p) mm_free(s->p); } in min_heap_dtor_() argument 69 struct event* min_heap_top_(min_heap_t* s) { return s->n ? *s->p : 0; } in min_heap_top_() argument 73 if (s->n == UINT32_MAX || min_heap_reserve_(s, s->n + 1)) in min_heap_push_() 75 min_heap_shift_up_(s, s->n++, e); in min_heap_push_() 81 if (s->n) in min_heap_pop_() 84 min_heap_shift_down_(s, 0u, s->p[--s->n]); in min_heap_pop_() 100 struct event *last = s->p[--s->n]; in min_heap_erase_() 138 unsigned a = s->a ? s->a * 2 : 8; in min_heap_reserve_() 147 s->p = p; in min_heap_reserve_() [all …]
|
| H A D | listener.c | 462 SOCKET s; member 516 res->s = EVUTIL_INVALID_SOCKET; in new_accepting_socket() 535 closesocket(as->s); in free_and_unlock_accepting_socket() 554 if (s == EVUTIL_INVALID_SOCKET) { in start_accepting() 568 closesocket(s); in start_accepting() 572 as->s = s; in start_accepting() 600 SOCKET s = as->s; in stop_accepting() local 601 as->s = EVUTIL_INVALID_SOCKET; in stop_accepting() 602 closesocket(s); in stop_accepting() 641 sock = as->s; in accepted_socket_invoke_user_cb() [all …]
|
| H A D | arc4random.c | 84 unsigned char s[256]; member 105 rs.s[n] = n; in arc4_init() 119 si = rs.s[rs.i]; in arc4_addrandom() 121 rs.s[rs.i] = rs.s[rs.j]; in arc4_addrandom() 122 rs.s[rs.j] = si; in arc4_addrandom() 421 si = rs.s[rs.i]; in arc4_getbyte() 423 sj = rs.s[rs.j]; in arc4_getbyte() 424 rs.s[rs.i] = sj; in arc4_getbyte() 425 rs.s[rs.j] = si; in arc4_getbyte() 426 return (rs.s[(si + sj) & 0xff]); in arc4_getbyte()
|
| H A D | strlcpy.c | 54 register const char *s = src; local 60 if ((*d++ = *s++) == 0) 69 while (*s++) 73 return (s - src - 1); /* count does not include NUL */
|
| H A D | event_iocp.c | 113 get_extension_function(SOCKET s, const GUID *which_fn) in get_extension_function() argument 117 WSAIoctl(s, SIO_GET_EXTENSION_FUNCTION_POINTER, in get_extension_function() 153 SOCKET s = socket(AF_INET, SOCK_STREAM, 0); in init_extension_functions() local 154 if (s == EVUTIL_INVALID_SOCKET) in init_extension_functions() 156 ext->AcceptEx = get_extension_function(s, &acceptex); in init_extension_functions() 157 ext->ConnectEx = get_extension_function(s, &connectex); in init_extension_functions() 158 ext->GetAcceptExSockaddrs = get_extension_function(s, in init_extension_functions() 160 closesocket(s); in init_extension_functions()
|
| H A D | mm-internal.h | 77 #define mm_strdup(s) event_mm_strdup_(s) argument 83 #define mm_strdup(s) strdup(s)
|
| H A D | win32select.c | 123 do_fd_set(struct win32op *op, struct idx_info *ent, evutil_socket_t s, int read) in do_fd_set() argument 139 set->fd_array[set->fd_count] = s; in do_fd_set() 286 SOCKET s; in win32_dispatch() local 340 s = win32op->readset_out->fd_array[i]; in win32_dispatch() 341 evmap_io_active_(base, s, EV_READ); in win32_dispatch() 350 s = win32op->exset_out->fd_array[i]; in win32_dispatch() 351 evmap_io_active_(base, s, EV_WRITE); in win32_dispatch() 360 s = win32op->writeset_out->fd_array[i]; in win32_dispatch() 361 evmap_io_active_(base, s, EV_WRITE); in win32_dispatch()
|
| H A D | http.c | 218 if (!s || !*s) in strsep() 220 tok = *s; in strsep() 4520 *s != '+' && *s != '-' && *s != '.') in scheme_ok() 4536 ++s; in userinfo_ok() 4537 else if (*s == '%' && s+2 < eos && in userinfo_ok() 4550 while (s && s<eos) { in regname_ok() 4553 ++s; in regname_ok() 4576 ++s; in parse_port() 4595 while (s < eos && *s != '.') { in bracket_addr_ok() 4597 ++s; in bracket_addr_ok() [all …]
|
| H A D | whatsnew-2.1.txt | 1 What's new in Libevent 2.1 9 Libevent 2.1, from a user's point of view. It's a work in progress. 133 There is an event_get_priority() function to return an event's 149 that's a no-op in past versions of Libevent, and we don't want to 187 call should block if the event's callback is running in another 203 another thread? Let's say that the other thread gets the lock 225 will not block on that event, even when the event's callback is 329 callback is no longer hardcoded; it's now configurable with 345 return a bufferevent's current watermark settings. 347 You can manually trigger a bufferevent's callbacks via [all …]
|
| H A D | evutil.c | 478 ++s; in evutil_strtoll() 479 if (*s == '-') in evutil_strtoll() 480 ++s; in evutil_strtoll() 482 ++s; in evutil_strtoll() 505 ++s; in evutil_strtoll() 506 if (*s == '-') in evutil_strtoll() 507 ++s; in evutil_strtoll() 510 ++s; in evutil_strtoll() 513 ++s; in evutil_strtoll() 1686 chomp (char *s) in chomp() argument [all …]
|
| H A D | make-event-config.sed | 25 s/#\( *\)define \([A-Z]\)/#\1define EVENT__\2/ 26 s/#\( *\)undef \([A-Z]\)/#\1undef EVENT__\2/ 27 s/#\( *\)if\(n*\)def \([A-Z]\)/#\1if\2def EVENT__\2/
|
| H A D | Vagrantfile | 20 # via virtualbox, however sometimes it is the only way, so instead let's 39 …system('tar --overwrite --transform=s/libevent/libevent-linux/ -xf .vagrant/libevent.tar -C .vagra… 80 …system('tar --overwrite --transform=s/libevent/libevent-freebsd/ -xf .vagrant/libevent.tar -C .vag… 121 …system('tar --overwrite --transform=s/libevent/libevent-netbsd/ -xf .vagrant/libevent.tar -C .vagr… 160 …system('tar --overwrite --transform=s/libevent/libevent-solaris/ -xf .vagrant/libevent.tar -C .vag… 223 …system('tar --overwrite --transform=s/libevent/libevent-osx/ -xf .vagrant/libevent.tar -C .vagrant… 321 …system('tar --overwrite --transform=s/libevent/libevent-win/ -xf .vagrant/libevent.tar -C .vagrant… 328 # windows does not have rsync builtin, let's use virtualbox for now 334 # box with vs2015 does not have C++ support, so let's install it manually 336 # cmake.install, so let's update it< [all …]
|
| H A D | ht-internal.h | 77 ht_string_hash_(const char *s) 81 while (*s) { 82 h += ((signed char)*s++)*m; 91 ht_string_hash_(const char *s) in ht_string_hash_() argument 94 const unsigned char *cp = (const unsigned char *)s; in ht_string_hash_() 100 h ^= (unsigned)(cp-(const unsigned char*)s); in ht_string_hash_()
|
| H A D | whatsnew-2.0.txt | 1 What's New In Libevent 2.0 so far: 8 Libevent 2.0, from a user's point of view. It was most recently 186 before. On Windows, however, it's an alias for SOCKET, which can 269 It's been pretty easy to forget to delete all your events before you 346 most Unix kernels use for network IO. (See Linux's skbuf interfaces, 347 or *BSD's mbufs). Data is added at the end of the linked list and 363 the buffer's contents in a linear chunk before you can use it. 449 implementation above, there are many new features in Libevent 2.0's 537 There's now an asynchronous getaddrinfo clone, evdns_getaddrinfo(), 598 The main benefit from Libevent's point of view is that tests which [all …]
|
| /libevent-2.1.12/test/ |
| H A D | regress_testutils.c | 142 static void strtolower(char *s) in strtolower() argument 144 while (*s) { in strtolower() 145 *s = EVUTIL_TOLOWER_(*s); in strtolower() 146 ++s; in strtolower() 229 evutil_socket_t s = evconnlistener_get_fd(lev); in regress_get_listener_addr() local 230 if (s <= 0) in regress_get_listener_addr() 232 return getsockname(s, sa, socklen); in regress_get_listener_addr()
|
| H A D | check-dumpevents.py | 44 cleaned_inserted = set( pat.sub(replace_time, s) for s in got_inserted 45 if "Internal" not in s)
|
| H A D | regress_buffer.c | 1404 evbuffer_add(evb, s, strlen(s)+2); in test_evbuffer_readln() 1416 evbuffer_add(evb, s, strlen(s)); in test_evbuffer_readln() 1432 evbuffer_add(evb, s, strlen(s)); in test_evbuffer_readln() 1462 evbuffer_add(evb, s, strlen(s)); in test_evbuffer_readln() 1487 evbuffer_add(evb, s, strlen(s)); in test_evbuffer_readln() 1507 evbuffer_add(evb, s, strlen(s)); in test_evbuffer_readln() 1558 evbuffer_add(evb_tmp, s, strlen(s)); in test_evbuffer_readln() 1563 evbuffer_add(evb_tmp, s, strlen(s)); in test_evbuffer_readln() 1568 evbuffer_add(evb_tmp, s, strlen(s)); in test_evbuffer_readln() 1597 evbuffer_add(evb_tmp, s, strlen(s)); in test_evbuffer_readln() [all …]
|
| H A D | regress_http.c | 251 ptr = evbuffer_search(buf, s, strlen(s), NULL); in evbuffer_contains() 2964 free(s); in http_uriencode_test() 2965 s = NULL; in http_uriencode_test() 2973 free(s); in http_uriencode_test() 2974 s = NULL; in http_uriencode_test() 2990 free(s); in http_uriencode_test() 2991 s = NULL; in http_uriencode_test() 2997 free(s); in http_uriencode_test() 2998 s = NULL; in http_uriencode_test() 3006 if (s) in http_uriencode_test() [all …]
|
| H A D | test-dumpevents.c | 41 sock_perror(const char *s) in sock_perror() argument 45 fprintf(stderr, "%s: %s\n", s, err); in sock_perror() 47 perror(s); in sock_perror()
|
| H A D | test-changelist.c | 93 ev_int64_t s, e, diff; in filetime_diff() local 95 s = filetime_to_100nsec(ftStart); in filetime_diff() 97 diff = e - s; in filetime_diff()
|
| H A D | regress.h | 117 #define test_ai_eq(ai, str, s, p) do { \ argument 118 if (test_ai_eq_((ai), (str), (s), (p), __LINE__)<0) \
|
| H A D | test-fdleak.c | 68 my_perror(const char *s) in my_perror() argument 71 s, evutil_socket_error_to_string(EVUTIL_SOCKET_ERROR())); in my_perror()
|
| H A D | regress_bufferevent.c | 646 const char s[] = TEST_STR; in listen_cb() local 651 bufferevent_write(bev, s, sizeof(s)); in listen_cb() 872 evutil_socket_t s; in want_fail_eventcb() local 875 s = bufferevent_getfd(bev); in want_fail_eventcb() 876 err = evutil_socket_error_to_string(evutil_socket_geterror(s)); in want_fail_eventcb() 878 EV_SOCK_ARG(s), err)); in want_fail_eventcb()
|
| /libevent-2.1.12/sample/ |
| H A D | https-client.c | 481 size_t s; in main() local 490 while ((s = fread(buf, 1, sizeof(buf), f)) > 0) { in main() 491 evbuffer_add(output_buffer, buf, s); in main() 492 bytes += s; in main()
|
| /libevent-2.1.12/include/event2/ |
| H A D | util.h | 456 #define EVUTIL_CLOSESOCKET(s) evutil_closesocket(s) argument 582 ev_int64_t evutil_strtoll(const char *s, char **endptr, int base);
|