Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^10: Does IO::Select work? Anywhere?

by BrowserUk (Pope)
on Oct 23, 2012 at 20:50 UTC ( #1000523=note: print w/replies, xml ) Need Help??


in reply to Re^9: Does IO::Select work? Anywhere?
in thread Does IO::Select work? Anywhere?

Even though you denigrated the earlier good professor's code of sysreading 1 byte at a time, in Re^4: Does IO::Select work? Anywhere? maybe therin lies your answer?

No, It doesn't. Plug that into your server and replace the call to perl's readline with a call to that -- and exactly the same thing will happen. Which is why I denigrated it.

If you're happy with not understanding why glib works, that's your call.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

RIP Neil Armstrong

Replies are listed 'Best First'.
Re^11: Does IO::Select work? Anywhere?
by zentara (Archbishop) on Oct 24, 2012 at 11:15 UTC
    if you're happy with not understanding why glib works, that's your call.

    Oh I don't understand how most modules do what they actually do, thats why I use them. For what it's worth, the code you are probably looking for is in gio/gsocket.c

    For me to guess at how to do it with plain select, I think you need to figure out how to access the socket's errno. See getting errno. From Perl you probably need to use sysctl.ph

    P.S. Glib is not the only lib out there, many prefer AnyEvent. Have you looked at how AnyEvent works against your socket blocker program?


    I'm not really a human, but I play one on earth.
    Old Perl Programmer Haiku ................... flash japh

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1000523]
help
Chatterbox?
[LanX]: memories....I missed my connection while chatting
[Discipulus]: in this case Corion we are speaking about software licensing: evry year or two we must rescan the whole ced to produce an excel report, while at every activation / disactivation we update a black box DB: i said that i a week i can produce the perl to..
[Discipulus]: rend out the xls IF i have access to the DB
[choroba]: LanX I miss working in a bank sometimes...
[Corion]: Discipulus: Ooof. Especially yearly things are things I like to automate instead of trying to remember how I did things last year...
[Corion]: And the second rule that I've learned is, that there is no one-off job, so writing a program for it pays off almost immediately. The third rule is to give all my programs numbers and have them reproduce that number in the name of their output files. :)
[Discipulus]: the true part is that also specification change between years.. but well our job is cheap but dont abuse of us.. ;=)
[LanX]: Choroba: do you miss chaos with ties? apply at the US government.. ;)

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (12)
As of 2017-03-29 12:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (350 votes). Check out past polls.