• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/router/netatalk-3.0.5/libevent/include/event2/

Lines Matching refs:evbuffer

33   An evbuffer can be used for preparing data before sending it to
39 A new evbuffer can be allocated with evbuffer_new(), and can be
67 As the contents of an evbuffer can be stored in multiple different
90 An evbuffer is an opaque data type for efficiently buffering data to be
95 struct evbuffer
102 Pointer to a position within an evbuffer.
119 /** Describes a single extent of memory inside an evbuffer. Used for
138 Allocate storage for a new evbuffer.
140 @return a pointer to a newly allocated evbuffer struct, or NULL if an error
143 struct evbuffer *evbuffer_new(void);
145 Deallocate storage for an evbuffer.
147 @param buf pointer to the evbuffer to be freed
149 void evbuffer_free(struct evbuffer *buf);
152 Enable locking on an evbuffer so that it can safely be used by multiple
159 @param buf An evbuffer to make lockable.
163 int evbuffer_enable_locking(struct evbuffer *buf, void *lock);
166 Acquire the lock on an evbuffer. Has no effect if locking was not enabled
169 void evbuffer_lock(struct evbuffer *buf);
172 Release the lock on an evbuffer. Has no effect if locking was not enabled
175 void evbuffer_unlock(struct evbuffer *buf);
195 /** Change the flags that are set for an evbuffer by adding more.
197 * @param buffer the evbuffer that the callback is watching.
202 int evbuffer_set_flags(struct evbuffer *buf, ev_uint64_t flags);
203 /** Change the flags that are set for an evbuffer by removing some.
205 * @param buffer the evbuffer that the callback is watching.
210 int evbuffer_clear_flags(struct evbuffer *buf, ev_uint64_t flags);
213 Returns the total number of bytes stored in the evbuffer
215 @param buf pointer to the evbuffer
216 @return the number of bytes stored in the evbuffer
218 size_t evbuffer_get_length(const struct evbuffer *buf);
228 @param buf pointer to the evbuffer
232 size_t evbuffer_get_contiguous_space(const struct evbuffer *buf);
235 Expands the available space in an evbuffer.
237 Expands the available space in the evbuffer to at least datlen, so that
240 @param buf the evbuffer to be expanded
244 int evbuffer_expand(struct evbuffer *buf, size_t datlen);
247 Reserves space in the last chain or chains of an evbuffer.
249 Makes space available in the last chain or chains of an evbuffer that can
268 @param buf the evbuffer in which to reserve space.
280 evbuffer_reserve_space(struct evbuffer *buf, ev_ssize_t size,
298 @param buf the evbuffer in which to reserve space.
304 int evbuffer_commit_space(struct evbuffer *buf,
308 Append data to the end of an evbuffer.
310 @param buf the evbuffer to be appended to
315 int evbuffer_add(struct evbuffer *buf, const void *data, size_t datlen);
319 Read data from an evbuffer and drain the bytes read.
321 If more bytes are requested than are available in the evbuffer, we
324 @param buf the evbuffer to be read from
329 int evbuffer_remove(struct evbuffer *buf, void *data, size_t datlen);
332 Read data from an evbuffer, and leave the buffer unchanged.
334 If more bytes are requested than are available in the evbuffer, we
337 @param buf the evbuffer to be read from
342 ev_ssize_t evbuffer_copyout(struct evbuffer *buf, void *data_out, size_t datlen);
345 Read data from an evbuffer into another evbuffer, draining
352 @param src the evbuffer to be read from
353 @param dst the destination evbuffer to store the result into
357 int evbuffer_remove_buffer(struct evbuffer *src, struct evbuffer *dst,
383 * Read a single line from an evbuffer.
389 * @param buffer the evbuffer to read from
396 char *evbuffer_readln(struct evbuffer *buffer, size_t *n_read_out,
400 Move all data from one evbuffer into another evbuffer.
411 int evbuffer_add_buffer(struct evbuffer *outbuf, struct evbuffer *inbuf);
414 A cleanup function for a piece of memory added to an evbuffer by
423 Reference memory into an evbuffer without copying.
433 referenced by this evbuffer.
437 int evbuffer_add_reference(struct evbuffer *outbuf,
442 Copy data from a file into the evbuffer for writing to a socket.
462 int evbuffer_add_file(struct evbuffer *outbuf, int fd, ev_off_t offset,
466 Append a formatted string to the end of an evbuffer.
470 @param buf the evbuffer that will be appended to
477 int evbuffer_add_printf(struct evbuffer *buf, const char *fmt, ...)
484 Append a va_list formatted string to the end of an evbuffer.
486 @param buf the evbuffer that will be appended to
491 int evbuffer_add_vprintf(struct evbuffer *buf, const char *fmt, va_list ap);
495 Remove a specified number of bytes data from the beginning of an evbuffer.
497 @param buf the evbuffer to be drained
501 int evbuffer_drain(struct evbuffer *buf, size_t len);
505 Write the contents of an evbuffer to a file descriptor.
507 The evbuffer will be drained after the bytes have been successfully written.
509 @param buffer the evbuffer to be written and drained
514 int evbuffer_write(struct evbuffer *buffer, evutil_socket_t fd);
517 Write some of the contents of an evbuffer to a file descriptor.
519 The evbuffer will be drained after the bytes have been successfully written.
521 @param buffer the evbuffer to be written and drained
528 int evbuffer_write_atmost(struct evbuffer *buffer, evutil_socket_t fd,
532 Read from a file descriptor and store the result in an evbuffer.
534 @param buffer the evbuffer to store the result
540 int evbuffer_read(struct evbuffer *buffer, evutil_socket_t fd, int howmuch);
543 Search for a string within an evbuffer.
545 @param buffer the evbuffer to be searched
553 struct evbuffer_ptr evbuffer_search(struct evbuffer *buffer, const char *what, size_t len, const struct evbuffer_ptr *start);
556 Search for a string within part of an evbuffer.
558 @param buffer the evbuffer to be searched
569 struct evbuffer_ptr evbuffer_search_range(struct evbuffer *buffer, const char *what, size_t len, const struct evbuffer_ptr *start, const struct evbuffer_ptr *end);
589 @param buffer the evbuffer to be search
596 evbuffer_ptr_set(struct evbuffer *buffer, struct evbuffer_ptr *ptr,
600 Search for an end-of-line string within an evbuffer.
602 @param buffer the evbuffer to be searched
613 struct evbuffer_ptr evbuffer_search_eol(struct evbuffer *buffer,
617 /** Function to peek at data inside an evbuffer without removing it or
628 @param buffer the evbuffer to peek into,
645 int evbuffer_peek(struct evbuffer *buffer, ev_ssize_t len,
650 /** Structure passed to an evbuffer_cb_func evbuffer callback
655 /** The number of bytes in this evbuffer when callbacks were last
665 removed from an evbuffer.
667 An evbuffer may have one or more callbacks set at a time. The order
683 typedef void (*evbuffer_cb_func)(struct evbuffer *buffer, const struct evbuffer_cb_info *info, void *arg);
686 /** Add a new callback to an evbuffer.
691 @param buffer the evbuffer to be monitored
692 @param cb the callback function to invoke when the evbuffer is modified,
697 struct evbuffer_cb_entry *evbuffer_add_cb(struct evbuffer *buffer, evbuffer_cb_func cb, void *cbarg);
699 /** Remove a callback from an evbuffer, given a handle returned from
707 int evbuffer_remove_cb_entry(struct evbuffer *buffer,
710 /** Remove a callback from an evbuffer, given the function and argument
716 int evbuffer_remove_cb(struct evbuffer *buffer, evbuffer_cb_func cb, void *cbarg);
727 @param buffer the evbuffer that the callback is watching.
732 int evbuffer_cb_set_flags(struct evbuffer *buffer,
737 @param buffer the evbuffer that the callback is watching.
742 int evbuffer_cb_clear_flags(struct evbuffer *buffer,
755 void evbuffer_cb_suspend(struct evbuffer *buffer, struct evbuffer_cb_entry *cb);
764 void evbuffer_cb_unsuspend(struct evbuffer *buffer, struct evbuffer_cb_entry *cb);
768 Makes the data at the begging of an evbuffer contiguous.
770 @param buf the evbuffer to make contiguous
776 unsigned char *evbuffer_pullup(struct evbuffer *buf, ev_ssize_t size);
779 Prepends data to the beginning of the evbuffer
781 @param buf the evbuffer to which to prepend data
787 int evbuffer_prepend(struct evbuffer *buf, const void *data, size_t size);
790 Prepends all data from the src evbuffer to the beginning of the dst
791 evbuffer.
793 @param dst the evbuffer to which to prepend data
794 @param src the evbuffer to prepend; it will be emptied as a result
797 int evbuffer_prepend_buffer(struct evbuffer *dst, struct evbuffer* src);
800 Prevent calls that modify an evbuffer from succeeding. A buffer may
813 int evbuffer_freeze(struct evbuffer *buf, int at_front);
815 Re-enable calls that modify an evbuffer.
822 int evbuffer_unfreeze(struct evbuffer *buf, int at_front);
826 Force all the callbacks on an evbuffer to be run, not immediately after
827 the evbuffer is altered, but instead from inside the event loop.
832 int evbuffer_defer_callbacks(struct evbuffer *buffer, struct event_base *base);