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