Link to home
Start Free TrialLog in
Avatar of smotbd
smotbd

asked on

500: UDP TCP direction and duplex

Can some on clear one fundamental issue for please as I read contradicting views on the following:
UDP is a connectionless protocol unlike TCP.
BUT....is UDP unidirectional or bidirectional and what is really meant by each. What about TCP (uni or bi??)
So then: is UDP and TCP half duplex or full duplex....... or does the duplex characteristic depend on the hardware - switches and ethernet etc.....

Many thanks
ASKER CERTIFIED SOLUTION
Avatar of davystocks
davystocks
Flag of Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of smotbd
smotbd

ASKER

Ok that's clear thanks.............but can you explain whether UDP and TCP transport is bi-directional or unidirectional. I think TCP is bi-directional where UDP is uni-directional i.e. TCP can send & receive data in both directions at the same time where as UDP can only send OR receive at any given time but since UDP is so much quicker then it seems bi-directional in effect............does that make sence!!?!?!! Is it correct?

Thanks  v much
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Brian Utterback
To further comment, UDP is not "so much quicker" than TCP, the bits flow with exactly the same speed. It is more correct to say that it has lower overhead, since it does not require the three-way handshake to establish the connection. As far as uni- vs. bi- directional, neither TCP or UDP is bi-directional in the way you seem to be saying. A packet starts from one machine and goes to another and can only carry data going from the source to the destination. Both protocols allow packets to flow in both directions simultaneously. So while a packet is carrying data from system 1 to system 2, at the very same time there could be a packet carrying data from system 2 to system 1. In this sense they are both bidirectional.
Avatar of smotbd

ASKER

Yes I thinki calvinetter comments is correct and helpfull BUT on top of this I think that there are two main types of sockets: stream and datagram (as seen in PHP manual and  the following link:
http://www.sockets.com/winsock.htm 
says that Sockets of type SOCK_STREAM are full-duplex byte streams.

Stream sockets provides sequenced, reliable, full-duplex, connection-based byte streams. The TCP protocol is based on this socket type.
Datagram sockets supports datagrams (connectionless, unreliable messages of a fixed maximum length). The UDP protocol is based on this socket type.

So Windows API does support full duplex on TCP but maybe only half duplex on UDP since unidirectional at any instance).
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Perhaps it might help us if you explain why you want to know whether TCP and UDP are full duplex or not. Is there a particular problem you are trying to solve or is this just to help your own understanding?
Avatar of smotbd

ASKER

Just to help my understanding.....and to try and start an argument!!!!

Thanks very much for all comments - very helpfull. I am clear of all point now and agree fully.