What is the difference between TCP and UDP ?

Answers were Sorted based on User's Feedback



What is the difference between TCP and UDP ?..

Answer / a.v.sudheer

TCP is a Transmission Control Protocol.
UDP is a User Datagram Protocol.
There are four major differences between UDP and TCP:
1. TCP can establishes a Connection and UDP cannot.
2. TCP provides a stream of unlimited length, UDP sends
small packets.
3.TCP gurantees that as long as you have a connection data
sent will arrive at the destination, UDP provides not
guarantee delivery.
4.UDP is faster for sending small amounts of data since no
connection setup is required, the data can be sent in less
time then it takes for TCP to establish a connection.

Is This Answer Correct ?    312 Yes 27 No

What is the difference between TCP and UDP ?..

Answer / bhumika arora

TCP UDP
1)Transmission control 1)User Datagram
Protocol Protocol
2)Slower than UDP 2)Faster than TCP
3)TCP offers error connection 3)UDP does't offer error
and Guaranteed Delivery connection & delivery
4)connnection oriented Protocol 4)Connectionless
Protocol
5)Generally use in webpages, 5)Generally use in Audio
database information etc and vidio files.
6)Provides or sends larger 6)Provides or sends
packets smaller packets.
7)For e.g. 7)For e.g.
SMTP port no is 25 DNS port is 53 or any
FTP port no is 21 movies site or games etc
Apache tomcat port is 80

Is This Answer Correct ?    118 Yes 5 No

What is the difference between TCP and UDP ?..

Answer / raja

TCP is a connection oriented protocol, which means that
everytime a packet is sent say from host A to B, we will
get an acknowledgement. Whereas UDP on the other hand, is a
connection less protocol.
Where will it be used : TCP -> Say you have a file transfer
and you need to ensure that the file reaches intact, and
time is not a factor, in such a case we can use TCP.

For more details : http://newadmins.blogspot.com/

Is This Answer Correct ?    117 Yes 27 No

What is the difference between TCP and UDP ?..

Answer / surendran

1. TCP(Transmission Control Protocol). TCP is a
connection-oriented protocol, a connection can be made from
client to server, and from then on any data can be sent
along that connection.
o Reliable - when you send a message along a TCP
socket, you know it will get there unless the connection
fails completely. If it gets lost along the way, the server
will re-request the lost part. This means complete
integrity, things don't get corrupted.
o Ordered - if you send two messages along a
connection, one after the other, you know the first message
will get there first. You don't have to worry about data
arriving in the wrong order.
o Heavyweight - when the low level parts of the
TCP "stream" arrive in the wrong order, resend requests
have to be sent, and all the out of sequence parts have to
be put back together, so requires a bit of work to piece
together.
2. UDP(User Datagram Protocol). A simpler message-
based connectionless protocol. With UDP you send messages
(packets) across the network in chunks.
o Unreliable - When you send a message, you don't
know if it'll get there, it could get lost on the way.
o Not ordered - If you send two messages out, you
don't know what order they'll arrive in.
o Lightweight - No ordering of messages, no tracking
connections, etc. It's just fire and forget! This means
it's a lot quicker, and the network card / OS have to do
very little work to translate the data back from the
packets.

Is This Answer Correct ?    78 Yes 12 No

What is the difference between TCP and UDP ?..

Answer / sujeetha

1.tcp is connection oriented udp is connectionless
tcp is reliable udp is not;

Is This Answer Correct ?    64 Yes 10 No

What is the difference between TCP and UDP ?..

Answer / pankaj

TCP is a Transmission Control Protocol.
UDP is a User Datagram Protocol.
TCP protocol is mainly used when we need report that our
data has trasferred succesfully or not,
while UDP doesnot check

Is This Answer Correct ?    58 Yes 19 No

What is the difference between TCP and UDP ?..

Answer / mukesh roy

TCP: is connection-oriented protocol. When a file or message
send it will get delivered unless connections fails. If
connection lost, the server will request the lost part.
There is no corruption while transferring a message.

UDP: is connectionless protocol. When you a send a data or
message, you don't know if it'll get there, it could get
lost on the way. There may be corruption while transferring
a message.

TCP: World Wide Web (Apache TCP port 80), e-mail (SMTP TCP
port 25 Postfix MTA), File Transfer Protocol (FTP port 21)
and Secure Shell (OpenSSH port 22) etc.

UDP: Domain Name System (DNS UDP port 53), streaming media
applications such as IPTV or movies, Voice over IP (VoIP),
Trivial File Transfer Protocol (TFTP) and online multiplayer
games etc

Is This Answer Correct ?    47 Yes 14 No

What is the difference between TCP and UDP ?..

Answer / khan

1. TCP(Transmission Control Protocol). TCP is a
connection-oriented protocol, a connection can be made from
client to server, and from then on any data can be sent
along that connection.
* Reliable - when you send a message along a TCP
socket, you know it will get there unless the connection
fails completely. If it gets lost along the way, the server
will re-request the lost part. This means complete
integrity, things don't get corrupted.
* Ordered - if you send two messages along a
connection, one after the other, you know the first message
will get there first. You don't have to worry about data
arriving in the wrong order.
* Heavyweight - when the low level parts of the
TCP "stream" arrive in the wrong order, resend requests have
to be sent, and all the out of sequence parts have to be put
back together, so requires a bit of work to piece together.

2. UDP(User Datagram Protocol). A simpler message-based
connectionless protocol. With UDP you send messages(packets)
across the network in chunks.
* Unreliable - When you send a message, you don't
know if it'll get there, it could get lost on the way.
* Not ordered - If you send two messages out, you
don't know what order they'll arrive in.
* Lightweight - No ordering of messages, no
tracking connections, etc. It's just fire and forget! This
means it's a lot quicker, and the network card / OS have to
do very little work to translate the data back from the packets.

Is This Answer Correct ?    34 Yes 4 No

What is the difference between TCP and UDP ?..

Answer / mary

TCP is connection oriented;
UDP is connectionless oriented;
TCP is reliable whereas UDP is not;
TCP is heavy whereas UDP is light weight;

Is This Answer Correct ?    29 Yes 8 No

What is the difference between TCP and UDP ?..

Answer / aneesa

TCP stands for transmission control protocol.it is an connection oriented service.for example telephonic conversation, that is high reliability will be there and also ensure ordered delivery that is if any data yet does not reach the receiver can again ask for the data.using TCP we can send plenty of information that is it sends stream of infinite length.where as UDP is an user datagram protocol.it is connectionless for example postal services.it does not ensures guaranteed delivery and also unreliable and order of delivery might be incorrect.it is of light weight.it can be used for sending small packets.

Is This Answer Correct ?    24 Yes 7 No

Post New Answer

More Java Networking Interview Questions

Explain the generic term internet.

0 Answers  


Public serversocket(int port, int queuelength) throws ioexception, bindexception?

0 Answers  


Explain look for local ports?

0 Answers  


What is a thread pool?

0 Answers  


Write the range of multicast socket IP address?

1 Answers  






Explain a daytime server?

0 Answers  


What is the main difference between Client side Java Script and and Server side Java Script how actually they run on both side with Example.

0 Answers   MCN Solutions,


Why socketutil is used?

0 Answers  


What is network programming in java?

0 Answers  


What is the difference between TCP/IP and UDP?

5 Answers  


If you do not want your program to halt while it waits for a connection, put the call to accept( ) in a separate thread?

0 Answers  


Is it possible to send an object using Sockets, if so, how it can be?

2 Answers   TCS,


Categories