in reply to Re: Re: IO::Select question
in thread IO::Select question

I won't pretend to know why it actually does that, maybe someone can answer that (it surprised me at the time too). It does only do it for STDIN as far as I can see, Sockets work exactly as you would expect (really waits until the other side sends some data).
So maybe it's something to do with a special case for STDIN..

C.

Replies are listed 'Best First'.
Re: Re: Re: Re: IO::Select question
by Eradicatore (Monk) on Jan 21, 2003 at 18:36 UTC
    One more question (maybe should be a new thread). For bidirectional, do I need to use two sockets? Or can the client and server both talk and listen on one socket (as long as they know who is talking and who is listening of course!).

    Thanks! J

      Actually, it's quite funny. I'm working on the exact same project right now. I'm using a combination of IO::Socket and IO::Select and it's starting to work quite nicely. To answer your question, you only need one socket: there is no reason for two different connections (ie: all the data can be sent through one numbered port), though both the client and server apps need to listen to the port.

      As soon as I've got something significantly better than it is now, I'll be sure to post it somewhere and I'll /msg you the link

        Great! That would be perfect! I'm trying to make a nice perl/tk client on windows for a linux mp3 server next to my stereo stuff. Windows doesn't like "fork", so thats why I'm trying to use the IO::Select. I have found a great server example, and it works great for dealing with multiple clients, but I can't seem to get it to reply back to the clients that I've tried to write. Do you want to see what I have so far? Let me know. Thanks again!