RSS

Compare TCP and UDP

21 Dec

TCP and UDP are the standard protocol to transmission in the network. Before programing, we need to know the different between TCP and UDP.

 

clip_image001 

clip_image002  

clip_image003

 

clip_image004

 

  

Property

TCP

UDP

Safe connection

In the transmission, we have to connecting and accepted from the sending station and receiving station.

UDP is unsafe connection(connectionless). Is don’t have accepted for terminated.  Data sending will accepted by default.

Error Detection

When detected error. Receiver will be notice back sender and choose some method to solve error

Because don’t have notice back, sender don’t know the error in transmission. Therefore, sender will know receiver always understand that receiver got it.

Spending resources and speeds

In the confirmed and guaranteed, sender and receiver  need resources to notice information. Therefore, This protocol will be lost many networking resources. Speed transmit decrease.

Don’t spend many resources, just enough to spend network resource for data. Speed transmit will be increase. It’s suit for the faster communication .

Supported for

Guaranteed communication and trustly communication. Examples : send file, transfer information, web,…

Faster speed communication, unsafe connection, reduce spend resource communication. Examples:  Video online, Direct TV,…

Protocol

Echo(7), ftp(20,21), SSH(22), telnet(23), SMTP(25), BGP(179), HTTP(80), IRC(194), SSL(443)…

DNS(53),DHCP(67)…

 
Leave a comment

Posted by on December 21, 2010 in Java, Knowledge, TCP/IP

 

Tags: , , , , , , , , , , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s