Brandon Black blblack at gmail.com
Mon Jun 11 12:17:34 CEST 2012

On Mon, Jun 11, 2012 at 4:39 AM, 钱晓明 <mailtoantares at 163.com> wrote:
> If I have started a io_watcher with EV_READ event, but later I want to set
> EV_WRITE event in callback function of EV_READ, should I have to call
> ev_io_stop first, then ev_io_set and ev_io_start again?
> If all messages have been send, should I call ev_io_stop again, clear
> EV_WRITE event  and ev_io_start again?

It would probably be more efficient to simply register separate
callbacks for EV_READ and EV_WRITE so you can start/stop them

-- Brandon

More information about the libev mailing list