Lines Matching +full:short +full:- +full:descriptor
2 * Copyright (c) 2000-2007 Niels Provos <provos@citi.umich.edu>
3 * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
47 file descriptor onto its input buffer, and call the read callback.
49 file descriptor when the output buffer has enough data, and call the write
55 <dt>Socket-based bufferevents</dt>
69 <dt>SSL-backed bufferevents</dt>
83 #include <event2/event-config.h>
104 #define BEV_EVENT_TIMEOUT 0x40 /**< user-specified timeout reached */
133 @param ctx the user-specified context for this bufferevent
152 @param ctx the user-specified context for this bufferevent
154 typedef void (*bufferevent_event_cb)(struct bufferevent *bev, short what, void *ctx);
159 * descriptor/bufferevent/whatever when this bufferevent is freed. */
180 @param fd the file descriptor from which data is read and written to.
181 This file descriptor is not allowed to be a pipe(2).
182 It is safe to set the fd to -1, so long as you later
193 Launch a connect() attempt with a socket-based bufferevent.
209 @return 0 on success, -1 on failure.
228 @return 0 if successful, -1 on failure.
264 @return 0 if successful, or -1 if an error occurred
283 @return 0 if successful, or -1 if an error occurred
314 @param writecb callback to invoke when the file descriptor is ready for
317 descriptor
349 Changes the file descriptor on which the bufferevent operates.
352 @param bufev the bufferevent object for which to change the file descriptor
353 @param fd the file descriptor to operate on
359 Returns the file descriptor associated with a bufferevent, or -1 if
360 no file descriptor is associated with the bufferevent.
376 descriptor. The data is appended to the output buffer and written to the
377 descriptor automatically as it becomes available for writing.
382 @return 0 if successful, or -1 if an error occurred
396 @return 0 if successful, or -1 if an error occurred
422 @return 0 if successful, or -1 if an error occurred.
459 @return 0 if successful, or -1 if an error occurred
463 int bufferevent_enable(struct bufferevent *bufev, short event);
470 @return 0 if successful, or -1 if an error occurred
474 int bufferevent_disable(struct bufferevent *bufev, short event);
483 short bufferevent_get_enabled(struct bufferevent *bufev);
502 EV_WRITE) becomes disabled until you re-enable it again. The
537 void bufferevent_setwatermark(struct bufferevent *bufev, short events,
542 Returns non-zero if events contains not only EV_READ or EV_WRITE.
551 int bufferevent_getwatermark(struct bufferevent *bufev, short events,
615 @return -1 on failure, 0 if no data was produces, 1 if data was produced
619 short iotype,
649 void bufferevent_trigger(struct bufferevent *bufev, short iotype,
662 void bufferevent_trigger_event(struct bufferevent *bufev, short what,
691 it will overflow the high-water mark associated with dst.
692 -1 means "no limit".
695 or flush as much as we can, possibly including an end-of-stream
697 @param ctx A user-supplied pointer.
738 @return 0 on success, -1 on failure.
752 Abstract type used to configure rate-limiting on a bufferevent or a group
763 /** Maximum configurable rate- or burst-limit. */
767 Initialize and return a new object to configure the rate-limiting behavior
779 Note that all rate-limits hare are currently best-effort: future versions
790 Note: 'cfg' is not currently reference-counted; it is not safe to free it
797 Set the rate-limit of a the bufferevent 'bev' to the one specified in
798 'cfg'. If 'cfg' is NULL, disable any per-bufferevent rate-limiting on
801 Note that only some bufferevent types currently respect rate-limiting.
802 They are: socket-based bufferevents (normal and IOCP-based), and SSL-based
805 Return 0 on success, -1 on failure.
812 Create a new rate-limit group for bufferevents. A rate-limit group
819 @param cfg The rate-limit for this group.
821 Note that all rate-limits hare are currently best-effort: future versions
824 Note also that only some bufferevent types currently respect rate-limiting.
825 They are: socket-based bufferevents (normal and IOCP-based), and SSL-based
833 Change the rate-limiting settings for a given rate-limiting group.
835 Return 0 on success, -1 on failure.
847 behavior, if a rate-limiting group is so tight on bandwidth that you're
854 The default min-share is currently 64 bytes.
856 Returns 0 on success, -1 on failure.
863 Free a rate-limiting group. The group must have no members when
873 A bufferevent may belong to no more than one rate-limit group at a time.
877 Return 0 on success and -1 on failure.
883 /** Remove 'bev' from its current rate-limit group (if any). */
892 Return 0 on success and -1 on failure.
902 Return 0 on success and -1 on failure.
919 If it is not configured with a per-bufferevent ratelimit, return
967 Returns 0 on success, -1 on internal error.
980 Subtract a number of bytes from a bufferevent rate-limiting group's
986 Returns 0 on success, -1 on internal error.