Forum     

Go Back   Digit Technology Discussion Forum > Portables, Peripherals and Electronics > QnA (read only)
Register FAQ Calendar Mark Forums Read

QnA (read only) Mods please help transfer the contents of this forum to proper sections. :)


 
 
LinkBack Thread Tools Search this Thread Display Modes
Old 14-04-2005, 11:54 PM   #1 (permalink)
In The Zone
 
Join Date: Nov 2004
Location: Mumbai
Posts: 201
Default Info about UDP and TCP required


Hi
Can anyone please tell me about UDP and TCP?
Or is there a tutorial available on this board or somewhere.
If possible does someone have a C or C++ code for UDP/TCP that they can provide.
Thanks
rachitar is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 14-04-2005, 11:59 PM   #2 (permalink)
In The Zone
 
tuXian's Avatar
 
Join Date: Nov 2004
Location: Hyderabad
Posts: 364
Default

basic diff - TCP is connection oriented and UDP connection less protocol.

what kinda code??
__________________
You know it's love when you memorize her IP to skip DNS overhead.
tuXian is offline  
Old 15-04-2005, 12:15 AM   #3 (permalink)
In The Zone
 
Join Date: Nov 2004
Location: Mumbai
Posts: 201
Default

Quote:
Originally Posted by TuxiaN
basic diff - TCP is connection oriented and UDP connection protocol.

what kinda code??
Code - C++/C Program for implementation of UDP/TCP interface on 2 machines one as a server and the other as client and both are connected through lan
rachitar is offline  
Old 15-04-2005, 12:20 AM   #4 (permalink)
Alpha Geek
 
Join Date: Feb 2004
Location: Belgaum
Posts: 745
Default

As tuxian has already said TCP is a connection orriented protocol while UDP is a connectionless.
Let me explain this a bit.TCP is virtually what is called a three way handshake.The analogy here is,when you want to make a telephone call you first dial the number[intiatiating the connection] with the appropriate prefix code ,the call takes place[connection],the person at the other end picks up the phone & you say hello.[connection made,send data]
Analogy w.r.t UDP,consider calling someone in a busy market,there is simply no guarantee that the other person will hear you.
The analogies I've given above,you'll find these in a variety of books.
TCP produces much overhead than UDP.UDP is deployed where the delivery of the chunks of data is not guranteed & fast delievery of data is utmost required where as in TCP the data is transfered to the other end & is checked whether the proper data[CRC check] has arrived then it is assembled in a proper sequence.If any part of the data is missing the host at the other end requests for sending of the data again.

So if you are a programmer two things to keep in mind,if data delivery is not important then opt of UDP or else stick with TCP.
__________________
The protection of a machine is a process & not a given -Duane Arnold.
www.Oobertech.net
Look ma my blog http://techhub.blogspot.com/
digen is offline  
Old 15-04-2005, 01:04 AM   #5 (permalink)
In The Zone
 
tuXian's Avatar
 
Join Date: Nov 2004
Location: Hyderabad
Posts: 364
Default

refer some good unix network programming books like Richard Stevens Network Programming.

BTW I will search my computer I think I have got some code like that somewhere in my system its of echoing a server and client and some more progs. Since its late night I will search my computer and tell u tommorrow.

Until then this link might be of help to you its got link to some source code too

http://www.cs.buffalo.edu/~milun/unix.programming.html

http://www-net.cs.umass.edu/ntu_socket/
__________________
You know it's love when you memorize her IP to skip DNS overhead.
tuXian is offline  
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


 
Latest Threads
- by clmlbx
- by tkin

Advertisement




All times are GMT +5.5. The time now is 05:43 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2