Dear Monks, Still playing with sockets here, and I have a working model within a script that generates a forked server and everything works swimmingly. Now, I'd like to break this up into some library files so I can share the code, I'm not sure about putting this as OO yet as what I intend to be able to reuse this for won't work as OO without a lot of directory and script redesign, which I can do later on as a larger project. My problem is being encountered in making the server and running IO::Socket::Net->new to generate the server; all the values are being sent correctly but somehow Protocol is being lost. Running in the debugger I get the following:
IO::Socket::socket(/usr/perl5/5.8.4/lib/sun4-solaris-64int/IO/Socket.p +m:78): 78: my($sock,$domain,$type,$protocol) = @_; DB<64> IO::Socket::socket(/usr/perl5/5.8.4/lib/sun4-solaris-64int/IO/Socket.p +m:80): 80: socket($sock,$domain,$type,$protocol) or 81: return undef; DB<64> x $sock 0 IO::Socket::INET=GLOB(0x4ea3bc) -> *Symbol::GEN0 DB<65> x $domain 0 2 DB<66> x $type 0 'SOCK_STREAM' DB<67> x $protocol 0 6 DB<68> IO::Socket::INET::_error(../Perl/IO/Socket/INET.pm:69): 69: my $sock = shift; DB<68> IO::Socket::INET::_error(../Perl/IO/Socket/INET.pm:70): 70: local($!); DB<68> x $sock 0 IO::Socket::INET=GLOB(0x4ea3bc) -> *Symbol::GEN0 DB<69> x $! 0 'Protocol not supported'
Checking the value of $protocol in the debugger shows its there when socket() is being called in socket.pm; but maybe its something I am not familiar with that could be generating the error? Any advice is welcome, I'd like to see what this is all about and get it working. Thanks a lot!

In reply to Socket.pm returning Protocol not supported by gokuraku

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.