Muliplexing Socket Connections

Matthew Dixon Cowles matt at mondoinfo.com
Mon Apr 23 14:25:32 EDT 2001


On Mon, 23 Apr 2001 10:41:30 -0700, Nathan Cassano
<nathan at cjhunter.com> wrote:

>The problem is I cannot get the select function to return a file
>descriptor from it's return read list. Does anyone have a simple
>example of socket multiplexing or some pointers?

If you need a file descriptor instead of a socket object, the socket
object's fileno() method may be what you want. If you need something
that's file-like perhaps the makefile() method would be useful.

> Does anyone have a simple example of socket multiplexing or some
> pointers?

It sounds like that asyncore module may be useful to you.

Regards,
Matt



More information about the Python-list mailing list