home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / sys / mac / programm / 14284 < prev    next >
Encoding:
Text File  |  1992-08-20  |  2.7 KB  |  71 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!convex!news.utdallas.edu!wupost!zaphod.mps.ohio-state.edu!rpi!uwm.edu!ux1.cso.uiuc.edu!news.cso.uiuc.edu!resnick
  3. From: resnick@cogsci.uiuc.edu (Pete Resnick)
  4. Subject: Re: MacTCP (UDP) questions
  5. References: <1992Aug19.173303.14543@vax5.cit.cornell.edu>
  6. Message-ID: <BtAvHy.Ksn@news.cso.uiuc.edu>
  7. Sender: usenet@news.cso.uiuc.edu (Net Noise owner)
  8. Organization: University of Illinois at Urbana
  9. Distribution: comp
  10. Date: Thu, 20 Aug 1992 20:56:21 GMT
  11. Lines: 58
  12.  
  13. tcd@vax5.cit.cornell.edu writes:
  14.  
  15. >1)  If I do my UDPRead calls asynchronously, where does the MacTCP driver
  16. >get the time to complete them?  Is much of the processing done on the
  17. >Ethernet card, or am I really just robbing Peter to pay Paul with 
  18. >the async calls?
  19.  
  20. The Ethernet card will generate an interrupt when incoming data
  21. arrives and your completion routine will be called. Just call
  22. WaitNextEvent while you are waiting for it to complete.
  23.  
  24. >2)  What happens if the receive buffer gets full?  Am I correct to assume
  25. >that incoming packets will be discarded, or do old ones get replaced?
  26.  
  27. Not sure. My guess would be the former as well.
  28.  
  29. >Does the condition clear itself as soon as enough of the buffer has been
  30. >returned?
  31.  
  32. I would assume so.
  33.  
  34. >3)  Although packet order is not critical (otherwise I would use TCP), 
  35. >it would be nice for my application to get access to the packets in
  36. >the same order they arrive.  Can I assume that a UDPRead will return
  37. >the oldest packet in the buffer?
  38.  
  39. Again, not sure, but my guess is that incoming packets will be put
  40. whereever there is space in the buffer, so will be in order unless the
  41. buffer starts to get full.
  42.  
  43. >4)  Is there any advantage (or disadvantage) to keeping at least one
  44. >UDPRead call outstanding at all times?
  45.  
  46. Advantage: quicker response to calls, keep that buffer empty.
  47. Disadvantage: none that I know of.
  48.  
  49. >5)  Where could I find the answers to these questions without asking
  50. >the net?
  51.  
  52. How about the MacTCP Programmer's Guide?
  53.  
  54. >...I do need some flow control, 
  55. >packet buffering, and some processing for partial "stream reconstitution".
  56. >Is it likely that (Mac)TCP does all of this (and more) better than I could
  57. >do with (Mac)UDP?  Thanks for any advice.
  58.  
  59. Hard to say without knowing exactly what you're doing, but it depends
  60. on (a) how good a programmer you are, and (b) how much you really need
  61. to do. Certainly using TCP will be quicker from a "time spent
  62. programming" point of view, but TCP does have a bunch of overhead.
  63. How's that for a good "It depends" answer?
  64.  
  65. pr
  66. --
  67. Pete Resnick             (...so what is a mojo, and why would one be rising?)
  68. Graduate assistant - Philosophy Department, Gregory Hall, UIUC
  69. System manager - Cognitive Science Group, Beckman Institute, UIUC
  70. Internet: resnick@cogsci.uiuc.edu
  71.