[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[Libevent-users] pause bufferevent callback
- To: "libevent-users@xxxxxxxx" <libevent-users@xxxxxxxx>
- Subject: [Libevent-users] pause bufferevent callback
- From: Ivan Popovski <ivan.popovski@xxxxxxxxx>
- Date: Tue, 29 Nov 2011 06:58:15 -0800 (PST)
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: libevent-users-outgoing@xxxxxxxx
- Delivered-to: libevent-users@xxxxxxxx
- Delivery-date: Tue, 29 Nov 2011 09:58:25 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ymail.com; s=s1024; t=1322578695; bh=Zzis5K6TBj/mcEgVvMSbn7qgFBWrCggwMUUS0LlaU2I=; h=X-YMail-OSG:Received:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=H3gwovmUeCrf4aZuy/Tgu0l7sfR1Re2oW8WoV30UXMWe3BKWOjVVUpPBYZRo9xD5+E1pLW9qxkwfuJgwOt7MRlEirBSBpVpjfhXoYjA6JfcZ/HpRiIQXvYsmaAfS1jyr36mlKuylX3yUbVdgkRO3KLe/viE1ae+VtRjP8Y5Tg10=
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=ymail.com; h=X-YMail-OSG:Received:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=mATtI9Wwl0dax1cXnqKApCd0Th37j/CgR67XhJPY7mwhlftpYCkz7kyr7zD0vdV3b4UtkbQbcbbvFGvL9rfshfPuMEFRu1ggY/fzv695SsEaw6RsFZb9tS4f6/pH3N+D/1GUxTLIEapmt3pojRKJpJgqPTveJHV7gl4lDPfBimg=;
- Reply-to: libevent-users@xxxxxxxxxxxxx
- Sender: owner-libevent-users@xxxxxxxxxxxxx
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.