home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- 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
- From: resnick@cogsci.uiuc.edu (Pete Resnick)
- Subject: Re: MacTCP (UDP) questions
- References: <1992Aug19.173303.14543@vax5.cit.cornell.edu>
- Message-ID: <BtAvHy.Ksn@news.cso.uiuc.edu>
- Sender: usenet@news.cso.uiuc.edu (Net Noise owner)
- Organization: University of Illinois at Urbana
- Distribution: comp
- Date: Thu, 20 Aug 1992 20:56:21 GMT
- Lines: 58
-
- tcd@vax5.cit.cornell.edu writes:
-
- >1) If I do my UDPRead calls asynchronously, where does the MacTCP driver
- >get the time to complete them? Is much of the processing done on the
- >Ethernet card, or am I really just robbing Peter to pay Paul with
- >the async calls?
-
- The Ethernet card will generate an interrupt when incoming data
- arrives and your completion routine will be called. Just call
- WaitNextEvent while you are waiting for it to complete.
-
- >2) What happens if the receive buffer gets full? Am I correct to assume
- >that incoming packets will be discarded, or do old ones get replaced?
-
- Not sure. My guess would be the former as well.
-
- >Does the condition clear itself as soon as enough of the buffer has been
- >returned?
-
- I would assume so.
-
- >3) Although packet order is not critical (otherwise I would use TCP),
- >it would be nice for my application to get access to the packets in
- >the same order they arrive. Can I assume that a UDPRead will return
- >the oldest packet in the buffer?
-
- Again, not sure, but my guess is that incoming packets will be put
- whereever there is space in the buffer, so will be in order unless the
- buffer starts to get full.
-
- >4) Is there any advantage (or disadvantage) to keeping at least one
- >UDPRead call outstanding at all times?
-
- Advantage: quicker response to calls, keep that buffer empty.
- Disadvantage: none that I know of.
-
- >5) Where could I find the answers to these questions without asking
- >the net?
-
- How about the MacTCP Programmer's Guide?
-
- >...I do need some flow control,
- >packet buffering, and some processing for partial "stream reconstitution".
- >Is it likely that (Mac)TCP does all of this (and more) better than I could
- >do with (Mac)UDP? Thanks for any advice.
-
- Hard to say without knowing exactly what you're doing, but it depends
- on (a) how good a programmer you are, and (b) how much you really need
- to do. Certainly using TCP will be quicker from a "time spent
- programming" point of view, but TCP does have a bunch of overhead.
- How's that for a good "It depends" answer?
-
- pr
- --
- Pete Resnick (...so what is a mojo, and why would one be rising?)
- Graduate assistant - Philosophy Department, Gregory Hall, UIUC
- System manager - Cognitive Science Group, Beckman Institute, UIUC
- Internet: resnick@cogsci.uiuc.edu
-