Hi,

I dived into libevent a couple of days ago.

To learn how to use libevent, I've been surfing sorce codes of simple
servers in
google codes using libevent and found two similar functions to read data from a
file descriptor:

"evbuffer_read" and "bufferevent_read".

The former is to read data from a file descriptor and store it in a
buffer(evbuffer).
The latter is to read data from a bufferevent and store it in a buffer(void *).

>From my perspective, they are all same.
I mean they use a different way but they actually accomplish the same
goal which is
to get data from a file descriptor.
( Although the latter doesn't read data directly from a file
descriptor, bufferevent's
internal buffer is automatically filled with data from a file descriptor.)

Now, my question is in what kinda situation should I use the former or
the latter function ?

Thanks in advance.

-wolfgang
_______________________________________________
Libevent-users mailing list
Libevent-users@monkey.org
http://monkeymail.org/mailman/listinfo/libevent-users

Reply via email to