Uhhh.... I can't believe I just posted it non-list again. Here it is for the list:
On 7/8/05, Wiggins d'Anconia <[EMAIL PROTECTED]> wrote: > Please group reply to prevent getting accidentally ignored and so > everyone can help and be helped. Also please bottom post. Whoops - sorry about that - Gmail must have picked your email address instead of the list when I hit the reply button. > Though it is more of a server rather than client example. Essentially > you open the filehandles (sockets) you want to read from, add them to an > IO::Select object, then ask that object for a list of handles ready to > be read from. Then just read from the handle. On the same token you > should really be using IO::Socket::* instead of messing with the sockets > directly. Aha - I must have confused it with some other select - I thought select() just selected which socket is the default. > If it is good enough for Mr. Stein, it is good enough for > *almost* all of us. Mr Stein? > On the same token you > should really be using IO::Socket::* instead of messing with the sockets > directly. Umm... I am using IO::Socket::INET > Having said all of this, it still isn't truly multitasking because you > can still block on a socket that had a lot of data or a slow socket. > This method presumes that your CPU and IO handler is fast enough to > prevent the appearance of a slow down because of blocking. Well, I wasn't really worried about slowdowns, but a blocking socket would be a real problem with my application - One channel could be sending lots and lots of messages, which wouldn't be relayed because the program is busy blocking on the other socket. > perldoc -f select > > Good luck, Thanks - I just looked at the website you pointed to - it looks perfect for what I need. The server code example is amazingly clean, simple and elegent - I will certainly use this for all multi-socket apps in future -- Dave All us base are belong to you. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>