Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

learn sth.

by Delfer (Novice)
on Jul 28, 2000 at 20:22 UTC ( [id://24893]=perlquestion: print w/replies, xml ) Need Help??

Delfer has asked for the wisdom of the Perl Monks concerning the following question:

Hi perlmonks, I have no experience on Socket Programming.I decide to learn
it through learning Perl,because I like Perl indeed.
My first question is What is timeout?And how do I
config and process it?

The second:The statement "if(SOCKET->opened)" appear in
someone's script.I can not find any help on opened()
function in the documents coming with ActivePerl5.6.
Is it return whether the SOCKET is in existence?
Pardon my puerile questions and immature English.
Thank you.

Replies are listed 'Best First'.
Sockets
by gryng (Hermit) on Jul 28, 2000 at 21:13 UTC
    You may want to check out the documentation about the higher level socket routines, they can really make network programming easier. Check out Perl interprocess computing (scroll down to the sockets section) They start off using the lower level stuff, then medium, and finally finish off with the high level stuff. Also GO Arena version 0.1a (shameless plug), has a sample server and client code... granted there is alot of other stuff in there, but all the network oriented code for the server is at the bottom of the file and not spread out all over the place.

    Enjoy,
    Gryn

RE: learn sth.
by autark (Friar) on Jul 28, 2000 at 21:17 UTC
    SOCKET->opened() is a method inherited from IO::Handle. So if you 'use IO::Handle' you may use its methods on your handles.

    You might find it much easier to use the IO::Socket module to do socket programming.

    Autark.

Re: learn sth.
by perlmonkey (Hermit) on Jul 28, 2000 at 21:20 UTC
    I think the 'opened' routine is inherited from the IO::Handle. Here is what it says:
    $io->opened Returns true if the object is currently a valid file descriptor.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://24893]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2024-04-25 05:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found