• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/transmission/libevent-2.0.20-stable/include/event2/

Lines Matching refs:bufferevent

31    @file event2/bufferevent.h
38 A bufferevent provides input and output buffers that get filled and
39 drained automatically. The user of a bufferevent no longer deals
43 Once initialized, the bufferevent structure can be used repeatedly
46 When reading is enabled, the bufferevent will try to read from the
48 When writing is enabled, the bufferevent will try to write data onto its
56 <dd>A bufferevent that reads and writes data onto a network
65 <dd>A bufferevent that transforms data, and sends or receives it
66 over another underlying bufferevent. Created with
70 <dd>A bufferevent that uses the openssl library to send and
94 These flags are passed as arguments to a bufferevent's event callback.
109 @see event2/bufferevent.h
111 struct bufferevent
121 A read or write callback for a bufferevent.
130 @param bev the bufferevent that triggered the callback
131 @param ctx the user-specified context for this bufferevent
133 typedef void (*bufferevent_data_cb)(struct bufferevent *bev, void *ctx);
136 An event/error callback for a bufferevent.
141 @param bev the bufferevent for which the error condition was reached
147 @param ctx the user-specified context for this bufferevent
149 typedef void (*bufferevent_event_cb)(struct bufferevent *bev, short what, void *ctx);
151 /** Options that can be specified when creating a bufferevent */
154 * descriptor/bufferevent/whatever when this bufferevent is freed. */
157 /** If set, and threading is enabled, operations on this bufferevent
165 * bufferevent. This option currently requires that
172 Create a new socket bufferevent over an existing socket.
174 @param base the event base to associate with the new bufferevent.
180 @return a pointer to a newly allocated bufferevent struct, or NULL if an
184 struct bufferevent *bufferevent_socket_new(struct event_base *base, evutil_socket_t fd, int options);
187 Launch a connect() attempt with a socket-based bufferevent.
192 If the bufferevent does not already have a socket set, we allocate a new
196 and configure the bufferevent so that a BEV_EVENT_CONNECTED event will be
199 @param bufev an existing bufferevent allocated with
205 int bufferevent_socket_connect(struct bufferevent *, struct sockaddr *, int);
212 @param bufev An existing bufferevent allocated with bufferevent_socket_new()
234 int bufferevent_socket_connect_hostname(struct bufferevent *,
241 @param bev The bufferevent object.
245 int bufferevent_socket_get_dns_error(struct bufferevent *bev);
248 Assign a bufferevent to a specific event_base.
253 @param bufev a bufferevent struct returned by bufferevent_new()
258 int bufferevent_base_set(struct event_base *base, struct bufferevent *bufev);
261 Return the event_base used by a bufferevent
263 struct event_base *bufferevent_get_base(struct bufferevent *bev);
266 Assign a priority to a bufferevent.
270 @param bufev a bufferevent struct
274 int bufferevent_priority_set(struct bufferevent *bufev, int pri);
278 Deallocate the storage associated with a bufferevent structure.
280 @param bufev the bufferevent structure to be freed.
282 void bufferevent_free(struct bufferevent *bufev);
286 Changes the callbacks for a bufferevent.
288 @param bufev the bufferevent object for which to change callbacks
299 void bufferevent_setcb(struct bufferevent *bufev,
304 Changes the file descriptor on which the bufferevent operates.
305 Not supported for all bufferevent types.
307 @param bufev the bufferevent object for which to change the file descriptor
310 int bufferevent_setfd(struct bufferevent *bufev, evutil_socket_t fd);
313 Returns the file descriptor associated with a bufferevent, or -1 if
314 no file descriptor is associated with the bufferevent.
316 evutil_socket_t bufferevent_getfd(struct bufferevent *bufev);
319 Returns the underlying bufferevent associated with a bufferevent (if
320 the bufferevent is a wrapper), or NULL if there is no underlying bufferevent.
322 struct bufferevent *bufferevent_get_underlying(struct bufferevent *bufev);
325 Write data to a bufferevent buffer.
331 @param bufev the bufferevent to be written to
337 int bufferevent_write(struct bufferevent *bufev,
342 Write data from an evbuffer to a bufferevent buffer. The evbuffer is
345 @param bufev the bufferevent to be written to
350 int bufferevent_write_buffer(struct bufferevent *bufev, struct evbuffer *buf);
354 Read data from a bufferevent buffer.
358 @param bufev the bufferevent to be read from
363 size_t bufferevent_read(struct bufferevent *bufev, void *data, size_t size);
366 Read data from a bufferevent buffer into an evbuffer. This avoids
369 @param bufev the bufferevent to be read from
373 int bufferevent_read_buffer(struct bufferevent *bufev, struct evbuffer *buf);
380 @param bufev the bufferevent from which to get the evbuffer
384 struct evbuffer *bufferevent_get_input(struct bufferevent *bufev);
394 @param bufev the bufferevent from which to get the evbuffer
398 struct evbuffer *bufferevent_get_output(struct bufferevent *bufev);
401 Enable a bufferevent.
403 @param bufev the bufferevent to be enabled
408 int bufferevent_enable(struct bufferevent *bufev, short event);
411 Disable a bufferevent.
413 @param bufev the bufferevent to be disabled
418 int bufferevent_disable(struct bufferevent *bufev, short event);
421 Return the events that are enabled on a given bufferevent.
423 @param bufev the bufferevent to inspect
426 short bufferevent_get_enabled(struct bufferevent *bufev);
429 Set the read and write timeout for a bufferevent.
431 A bufferevent's timeout will fire the first time that the indicated
433 during which the bufferevent was trying to read or write.
436 bufferevent's read or write operation has been suspended because
441 Calling bufferevent_enable or setting a timeout for a bufferevent
446 bufferevent's event callback is called with the
450 @param bufev the bufferevent to be modified
454 int bufferevent_set_timeouts(struct bufferevent *bufev,
460 On input, a bufferevent does not invoke the user read callback unless
462 is beyond the high watermark, the bufferevent stops reading from the network.
469 @param bufev the bufferevent to be modified
475 void bufferevent_setwatermark(struct bufferevent *bufev, short events,
479 Acquire the lock on a bufferevent. Has no effect if locking was not
482 void bufferevent_lock(struct bufferevent *bufev);
485 Release the lock on a bufferevent. Has no effect if locking was not
488 void bufferevent_unlock(struct bufferevent *bufev);
506 Triggers the bufferevent to produce more data if possible.
508 @param bufev the bufferevent object
513 int bufferevent_flush(struct bufferevent *bufev,
537 /** A callback function to implement a filter for a bufferevent.
560 Allocate a new filtering bufferevent on top of an existing bufferevent.
562 @param underlying the underlying bufferevent.
564 bufferevent
566 bufferevent
567 @param options A bitfield of bufferevent options.
569 this bufferevent is freed.
572 struct bufferevent *
573 bufferevent_filter_new(struct bufferevent *underlying,
587 @param options A set of options for this bufferevent
588 @param pair A pointer to an array to hold the two new bufferevent objects.
592 struct bufferevent *pair[2]);
595 Given one bufferevent returned by bufferevent_pair_new(), returns the
598 struct bufferevent *bufferevent_pair_get_partner(struct bufferevent *bev);
601 Abstract type used to configure rate-limiting on a bufferevent or a group
639 until no bufferevent is using it.
644 Set the rate-limit of a the bufferevent 'bev' to the one specified in
645 'cfg'. If 'cfg' is NULL, disable any per-bufferevent rate-limiting on
648 Note that only some bufferevent types currently respect rate-limiting.
654 int bufferevent_set_rate_limit(struct bufferevent *bev,
670 Note also that only some bufferevent types currently respect rate-limiting.
688 bufferevent in a group for reading or writing at a time.
692 only willing to send 1 byte per tick per bufferevent, you might instead
695 up send 1 byte per tick per bufferevent on average, but you don't send
715 A bufferevent may belong to no more than one rate-limit group at a time.
721 int bufferevent_add_to_rate_limit_group(struct bufferevent *bev,
725 int bufferevent_remove_from_rate_limit_group(struct bufferevent *bev);
730 Return the current read or write bucket size for a bufferevent.
731 If it is not configured with a per-bufferevent ratelimit, return
733 Note that it can return a negative value if the bufferevent has been
738 ev_ssize_t bufferevent_get_read_limit(struct bufferevent *bev);
739 ev_ssize_t bufferevent_get_write_limit(struct bufferevent *bev);
742 ev_ssize_t bufferevent_get_max_to_read(struct bufferevent *bev);
743 ev_ssize_t bufferevent_get_max_to_write(struct bufferevent *bev);
748 Return the read or write bucket size for a bufferevent rate limit
763 Subtract a number of bytes from a bufferevent's read or write bucket.
766 bufferevent will resume or suspend reading writing as appropriate.
767 These functions make no change in the buckets for the bufferevent's
774 int bufferevent_decrement_read_limit(struct bufferevent *bev, ev_ssize_t decr);
775 int bufferevent_decrement_write_limit(struct bufferevent *bev, ev_ssize_t decr);
781 Subtract a number of bytes from a bufferevent rate-limiting group's