[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[Libevent-users] pause bufferevent callback



Hi.

Sorry on newbie question.

Is there way to pause read callback, because i have fixed length buffer 
and in one moment need to avoid overflow and stop readcb until other
module consumes data (or other conditions are met)? The time between
reading and consuming is not defined.

Can i use bufferevent_disable/bufferevent_enable for this?
Will EV_READ + libevent_disable() stop reading from socket completely
or only disable callback calling?

The idea is to pause readcb in one moment and have ability to explicitly
continue when data is consumed, ofc with no data loss.
Can you give me some hints how to do this?

There are also deferred callbacks, but can't find any useful examples on
their usage.

Thank You.
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.