in reply to slow, slow IO::Select

duh, that'll be like a yes - the has_exception call is blocking, because it is without a timeout. I don't really want to wait a second every time I go through the while loop, just to check for exceptions, so I think I'll kill that bit. I didn't really understand it anyway... what is an "exception" and what is "out of band data"?

Hmm. Must understand more about socket programming. I haven't yet figured out how to optimise this thing... wonder what the best chunk size to get data is from the whois server?

dave hj~

Replies are listed 'Best First'.
Re: Re: slow, slow IO::Select
by AgentM (Curate) on Mar 13, 2001 at 06:38 UTC
    Exceptions come around in Perl usually in the form of signals. Generally, Perl code return "bad" values from functions instead of generating "exceptions". (Exceptions come around in C++ and Java among others.)

    OOB (out of band data) generally generates a signal (unless you turn that off) and is placed in a high-part of the TCP/UDP data being sent. It was designed for "emergency" information but it remains generally unused in everyday apps. It can be used for anything you wish if you know how to throw some OOB data together, send it, and capture it. Otherwise, you get SIGURG (urgent) and bomb. Do the RIPE/WHOIS servers actually use that? I wasn't aware of that.

    M$ History Lesson of the Day: A few years back, it was discovered that many ports on a Windows machine choked on OOB data, causing anything from a full system lockup to a BSOD. Hence, winnuke was born, which was essentially 3 lines of real code. Thanks, M$!

    AgentM Systems nor Nasca Enterprises nor Bone::Easy nor Macperl is responsible for the comments made by AgentM. Remember, you can build any logical system with NOR.
(tye)Re: slow, slow IO::Select
by tye (Sage) on Mar 13, 2001 at 21:11 UTC

    I'll disagree with AgentM on exceptions. With select, an "exception" means an error, for example, the other side resetting the connection. "Has exceptions" roughly means that a read or write attempt would fail rather than hang while "can read" and "can write" means that such calls would succeed rather than hang.

    I'll agree with him about OOB data. (:

            - tye (but my friends call me "Tye")