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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.
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).
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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?
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.
Thanks very much for all comments - very helpfull. I am clear of all point now and agree fully.
ASKER
Thanks v much