home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.programmer
- Path: sparky!uunet!cs.utexas.edu!zaphod.mps.ohio-state.edu!hobbes.physics.uiowa.edu!news.uiowa.edu!icaen!dsiebert
- From: dsiebert@icaen.uiowa.edu (Doug Siebert)
- Subject: Wanted: An asynchronous gethostbyaddr()
- Message-ID: <1992Dec17.204451.27530@icaen.uiowa.edu>
- Sender: usenet@icaen.uiowa.edu (UseNet News daemon)
- Organization: Iowa Computer Aided Engineering Network, University of Iowa
- Date: Thu, 17 Dec 1992 20:44:51 GMT
- Lines: 27
-
-
- As the subject line says, I'd like an asychronous gethostbyaddr(). I've got
- a program that receives a number of TCP socket connects, and currently I can't
- use gethostbyaddr() in that program because it blocks (sometimes for quite a
- while on sites in other continents) I don't know much about the resolver(3)
- calls, but they appear as though they block until a response is received just
- like gethostbyaddr().
-
- Does anyone have code that will do this? All I want is a name to an address,
- or to know there is no name for that address that can be found. I need to
- have a socket (either UDP or TCP, doesn't matter to me) in my program so that
- I know when this information arrives and I can get the hostname information I
- need out of it. I do know that nameserver calls associate an ID of sorts with
- each calls, so I can keep track of that and receive my information out of
- order.
-
- As a last resort, I could get some libc source and roll my own, but surely
- *someone* *somewhere* has invented this particular wheel before? (I hope!)
- Thanks for any code/help/examples/leads anyone can provide.
-
- --
- /-----------------------------------------------------------------------------\
- | Doug Siebert | "I don't have to take this abuse |
- | Internet: dsiebert@isca.uiowa.edu | from you - I've got hundreds of |
- | NeXTMail: dsiebert@chop.isca.uiowa.edu | people waiting in line to abuse |
- | ICBM: 41d 39m 55s N, 91d 30m 43s W | me!" Bill Murray, Ghostbusters |
- \-----------------------------------------------------------------------------/
-