home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!newsstand.cit.cornell.edu!vax5.cit.cornell.edu!tcd
- From: tcd@vax5.cit.cornell.edu
- Newsgroups: comp.sys.mac.programmer
- Subject: MacTCP (UDP) questions
- Message-ID: <1992Aug19.173303.14543@vax5.cit.cornell.edu>
- Date: 19 Aug 92 17:33:03 EDT
- Distribution: comp
- Organization: Cornell University
- Lines: 44
-
- I am working on an application that needs to transfer a continuous,
- high volume stream of data from one Macintosh to another. Because we
- can tolerate some amount of data loss/corruption it seemed like UDP
- would be a better choice than TCP. I have not seen much in the way
- of discussion or sample code regarding UDP, and a number of questions
- have come up.
-
- 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?
-
- 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?
- Does the condition clear itself as soon as enough of the buffer has been
- returned?
-
- 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?
-
- 4) Is there any advantage (or disadvantage) to keeping at least one
- UDPRead call outstanding at all times?
-
- 5) Where could I find the answers to these questions without asking
- the net? I have a feeling that debugging/optimizing this stuff is not
- going to be easy, so I am trying to think this through clearly in advance,
- rather than just jumping in.
-
- Finally, it seems true that, in principal, UDP is going to provide
- a much higher data transfer rate than TCP, as long I don't mind a little
- corruption. However, I wonder how true this will actually be in
- implementation on the Macintosh. Even though I don't need the error
- checking and acknowledgments of TCP, 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.
-
- Tim Dorcey
- Cornell Information Technologies
- tcd@cornellc.cit.cornell.edu
- my implementation
-
-