Lines Matching +full:current +full:- +full:limiting
2 * Copyright (c) 2008-2012 Niels Provos and Nick Mathewson
33 #include "event2/event-config.h"
35 #include "evconfig-private.h"
37 #include "defer-internal.h"
38 #include "evthread-internal.h"
40 #include "ratelim-internal.h"
43 #include "ipv6-internal.h"
82 /** Current limits for the group. */
129 /** Fields for rate-limiting a single bufferevent. */
131 /* Linked-list elements for storing this bufferevent_private in a
137 /** The rate-limiting group for this bufferevent, or NULL if it is
138 * only rate-limited on its own. */
141 /* This bufferevent's current limits. */
143 /* Pointer to the rate-limit configuration for this bufferevent.
144 * Can be shared. XXX reference-count this? */
189 /** Set to the current socket errno if we have deferred callbacks and
202 /** Current reference count for this bufferevent. */
217 /** Rate-limiting information for this bufferevent */
269 not need to adjust the 'enabled' field. Returns 0 on success, -1
275 not need to adjust the 'enabled' field. Returns 0 on success, -1
305 #define BEV_IS_SOCKET(bevp) ((bevp)->be_ops == &bufferevent_ops_socket)
306 #define BEV_IS_FILTER(bevp) ((bevp)->be_ops == &bufferevent_ops_filter)
307 #define BEV_IS_PAIR(bevp) ((bevp)->be_ops == &bufferevent_ops_pair)
311 #define BEV_IS_OPENSSL(bevp) ((bevp)->be_ops == &bufferevent_ops_openssl)
318 #define BEV_IS_ASYNC(bevp) ((bevp)->be_ops == &bufferevent_ops_async)
331 /** For internal use: clear the conditions 'what' on bufev, and re-enable
339 /** For internal use: clear the conditions 'what' on bufev, and re-enable
357 @return 0 if successful, or -1 if an error occurred
404 /* Making this inline since all of the common-case calls to this function in
410 evbuffer_get_length(bufev->input) >= bufev->wm_read.low)) in bufferevent_trigger_nolock_()
413 evbuffer_get_length(bufev->output) <= bufev->wm_write.low)) in bufferevent_trigger_nolock_()
460 if (evutil_timerisset(&(bev)->timeout_read)) \
461 event_add(&(bev)->ev_read, &(bev)->timeout_read); \
467 if (evutil_timerisset(&(bev)->timeout_write)) \
468 event_add(&(bev)->ev_write, &(bev)->timeout_write); \
471 event_del(&(bev)->ev_read)
473 event_del(&(bev)->ev_write)
487 EVLOCK_LOCK(locking->lock, 0); \
493 EVLOCK_UNLOCK(locking->lock, 0); \
498 /* ==== For rate-limiting. */