At 07:10 PM 08.26.2001 -0700, Peter Scott wrote:
>At 08:56 PM 8/26/01 -0400, Jim Conner wrote:
>>I have looked all over the place for something about the basic steps to 
>>setting up a tcp socket in Perl using Socket.pm and I simply cannot find 
>>it. I am using Socket.pm and I need to know if anyone out there would be 
>>willing to provide this.
>>Now, I know that there are examples for using Socket.pm in the Camel and 
>>the Cookbook but the explanations (for me) are sketchy at best and are in 
>>no way IMO easy for a beginner to get.
>>So, for example, what I would like to know is what are the steps to 
>>setting up a socket? Something like the following would be helpful:
>>
>># First, get the remote IP address
>>$remote_ipaddr = "192.168.120.1"
>>
>># Then get the remote port
>>$remote_port   = "1400";
>>
>># Then what?  And better yet, why?
>>
>>
>>The Socket.pm functions just totally baffle me as to their purpose and 
>>needs. There are so many of them yet only a few them are needed it seems 
>>like, right? And if so which ones are absolutely necessary to use? Why? 
>>At what times are they to be used and not used?
>>I am opting *not* to use IO::Socket::INET simply because its so easy to 
>>use and I really want to know what the needs are for Socket.pm (and my 
>>current project dissallows me from installing the module too).
>
>These are bizarre requirements.  Socket.pm is too hard for a beginner, but 
>you don't want to use IO::Socket::INET because it's too *easy*?  This is 
>like Goldilocks and the Three Bears.  I don't think there's an in-between 
>module.

Lol....Yeah, I can see your point of view.  I guess I was just looking for 
easy steps and didn't think that that was a big deal but then again, I've 
been somewhat stumped on this for sometime so maybe that was an oversight. 
:)  I consider myself to be more intermediate in Perl and definitely 
beginner in socket programming.


>For the best examples and explanations I've seen on Socket.pm and 
>everything else to do with networking in Perl, see Lincoln Stein's book, 
>"Network Programming with Perl" (Addison-Wesley, 2001).
>
>To learn about socket programming in general, W. Richard Stevens' books 
>"TCP/IP Illustrated" and "UNIX Network Programming" can't be beat.  Since 
>your goal appears to be to understand what's going on - commendable - I'd 
>suggest you get one or the other of those.

Thank you very much for the book recommendations.  I will see if the 
company will float me a few bucks for these.


>If you have to get something done on a schedule, of course, go wit the 
>easy way to do it.  A project that won't let you install a module that 
>makes life easier is just strange.  You know you can install a module into 
>your own directory, right?  You don't have to put it in with Perl?  It can 
>live in the same directory as whatever script you're writing if you want.

Well, I am pretty sure I could get some strings pulled but again, I was 
very interested in using this opportunity to learn about socket 
programming...perhaps a quick and dirty was what I was looking for. :)

Thanks again! :)

- Jim



>--
>Peter Scott
>Pacific Systems Design Technologies
>http://www.perldebugged.com
>



- Jim

-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
http://www.perlmonks.org/index.pl?node_id=67861&lastnode_id=67861

-----BEGIN PERL GEEK CODE BLOCK-----      ------BEGIN GEEK CODE BLOCK------
Version: 0.01                             Version: 3.12
P++>*@$c?P6?R+++>++++@$M                  GIT/CM/J d++(--) s++:++ a-
 >++++$O!MA->++++E!> PU-->+++BD            C++++(+) UB++++$L++++$S++++$
$C-@D!>++++(-)$S++++@$X?WP+>++++MO!>+++   P++(+)>+++++ L+++(++++)>+++++$ !E*
+PP+++>++++n-CO?PO!o >++++G               W++(+++) N+ o !K w--- PS---(-)@ PE
 >*(!)$A-->++++@$Ee---(-)Ev++uL++>*@$uB+   Y+>+++ PGP t+(+++)>+++@ 5- X++ R@
 >*@$uS+>*@$uH+uo+w-@$m!                   tv+ b? DI-(+++) D+++(++) G(++++)
------END PERL GEEK CODE BLOCK------      ------END GEEK CODE BLOCK------


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to