Beefy Boxes and Bandwidth Generously Provided by pair Networks Cowboy Neal with Hat
The stupid question is the question not asked
 
PerlMonks  

Re: Re: Re: porting this 'setnonblocking' subroutine to Windows

by Veachian64 (Scribe)
on Dec 30, 2001 at 21:46 UTC ( [id://135284]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Re: Re: porting this 'setnonblocking' subroutine to Windows
in thread porting this 'setnonblocking' subroutine to Windows

Simply use the d/l code link at the bottom of the page and get the module. Then in your pircd directory, make a subdirectory named Portable, then rename the file you downloaded NonBlock.pm and put it in the Portable directory. Open it up and change setnonblock in the @EXPORT_OK declaration to setsocknonblock (Looks like a simple typo, correct me if I'm wrong). Then in the pircd file, put use Portable::NonBlock qw(setsocknonblock); at the top and replace all instances of setnonblocking to setsocknonblock (except for the sub declaration for setnonblocking. You can leave that as it is or take it out). Unfortunately, even though the IRCd will run now, you'll get an error after a user connects, which is "Your vendor has not defined POSIX macro EWOULDBLOCK".

Replies are listed 'Best First'.
(MeowChow) Re4: porting this 'setnonblocking' subroutine to Windows
by MeowChow (Vicar) on Dec 31, 2001 at 01:53 UTC
    You're right, it's a typo, and the code could stand some cleaning up. Regarding the EWOULDBLOCK problem, POSIX::EWOULDBLOCK should probably be set to the same value as EAGAIN. I believe they are synonymous.
       MeowChow                                   
                   s aamecha.s a..a\u$&owag.print
      EAGAIN and EWOULDBLOCK are actually different errors, though they are similar enough that many vendors alias one to the other.

      Certainly if one is present and the other is not, then I think the missing should be aliased to the present one. But they should not be assumed to be identical because they aren't always.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://135284]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.