Re: TCP or UDP?



So far it seems you favor TCP with the robustness
requirement. TCP is not slower than UDP, even though
it has 12 bytes greater overhead per packet (20 vs 8).
It has another hidden overhead in the sense it does not
preserve message boundaries (it has no notion of messages),
so you have to store your packet lengths as part of the
packet data in the stream so you can reconstruct them
from the TCP stream at the other end.

--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnickolov@xxxxxxxx
MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================

"Nils" <leiff@xxxxxxxxxxx> wrote in message
news:ekfnor$si7$1@xxxxxxxxxxxxxxxxxxxxx
Hi,

I need an advice which protocol to use: I develop a client/server system
where the two apps communitcate through packets in a size of 512 bytes up
to 8192 bytes. the sending should be as fast as possible. It has to work
in an intranet only. Rubustness is a must (but I guess because it's only
needed in intranet it's no problem if I would use UDP?). What about speed,
is TCP slower because of overhead or is the size so big that the overhead
can be ignored?

Regards,

Nils



.



Relevant Pages

  • Re: Incoherent E-mails
    ... The Novell crap was originally run on IPX ... The term in the early-mid nineties was "packet storm". ... The original advantage of UDP was ... > 60 bytes for TCP. ...
    (alt.computer.security)
  • Re[2]: Why TCP is more secure than UDP?
    ... The point that you use TCP ur UDP doesnt really matter, ... Suppose this service just echoes back any packet I send it. ... BD> Suppose my tricky friend "Moe" is across the internet at 10.0.0.1 (Oh ...
    (Security-Basics)
  • Re: recvfrom() strange operation
    ... I have only one escape way for this kind of UDP operation. ... TCP receive you always send data to upper level in sequence, ... In case of UDP you do not know the packet ...
    (comp.os.linux.development.system)
  • Re: A question regarding MTU: how it can effect TCP performance + other queries
    ... Can you check if your physical NIC has TCP large send offload enabled? ... I can't think of anything for the UDP case however, that just seems strange to me. ... Are you grouping multiple UDP packets in one TCP packet? ... encapsulated within another TCP packet when passed to physical interface, while for UDP I am sending UDP packet encapsulated within TCP packet when passed to physical interface. ...
    (microsoft.public.development.device.drivers)
  • Re: HTTP over both TCP and UDP
    ... but we're not talking about using UDP. ... with TCP packets. ... routers, and the server. ... you put a sequence number in the UDP packet. ...
    (comp.os.linux.networking)

Quantcast