home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / perl / 5631 < prev    next >
Encoding:
Text File  |  1992-08-31  |  1.2 KB  |  30 lines

  1. Newsgroups: comp.lang.perl
  2. Path: sparky!uunet!boulder!news
  3. From: dyker@locutus.colorado.edu (Barbara Dyker)
  4. Subject: perl socket filehandles
  5. Message-ID: <1992Aug31.181515.4294@colorado.edu>
  6. Sender: news@colorado.edu (The Daily Planet)
  7. Nntp-Posting-Host: locutus.cs.colorado.edu
  8. Organization: University of Colorado, Boulder
  9. Date: Mon, 31 Aug 1992 18:15:15 GMT
  10. Lines: 18
  11.  
  12. I'm trying to write a program that will get started from
  13. inetd.  All I want to do is a getpeername on file descriptor
  14. zero.  How do I assign in perl a particular value to a socket
  15. filehandle so I can do things like getpeername?  I tried
  16. doing simply   
  17.     $mysockaddr = getpeername(0);
  18. which gives me zip.
  19.  
  20. Sockets are not really my thing so I could be missing something
  21. fundamentally trivial.  It seems that if I wanted to do a
  22. getsockname I would have the same problem.  In this
  23. particular case I don't care much about my end.  Anyone
  24. have such a program I could use as an example?  
  25.  
  26. Barbara J. Dyker                       Department of Computer Science
  27. Computer Systems Manager               Campus Box 430B, ECEE00-69
  28. barb@cs.colorado.edu                   University of Colorado
  29. (303) 492-2545                         Boulder, CO  80309-0430
  30.