I'm coming from Tcl-world ...
robin at jessikat.fsnet.co.uk
Sat Aug 3 18:48:19 CEST 2002
In message <20020803185701.A18720 at hishome.net>, Oren Tirosh <oren-py-
l at hishome.net> writes
>> >Have you tried asyncore?
>> > Oren
>> yes, it's quite a mess working out what's going on.
>Yes, you're right. The asyncore documentation could be better. Actually it's
>very simple to use:
>Write an object with the following methods:
> writable() - return true if you wish to get write events
> readable() - return true if you wish to get read events
> handle_error() - called on any errors
> handle_write_event() - called on write event
> handle_read_event() - called on read event
> also called on EOF, in that case reading will return ''
>set socket_map[fd] to point to this object (multiple objects, more likely)
>The loop will return either on timeout or when one of the handlers
>raises the asyncore.ExitNow exception.
Inspired by Steve Holden in another thread I was just looking at
and see no mention of the handle_write_event & handle_read_event
methods. I assume they're aliases for handle_write and handle_read.
More information about the Python-list