home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / unix / programm / 5727 < prev    next >
Encoding:
Text File  |  1992-12-18  |  2.0 KB  |  38 lines

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