This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

does udp have a server and client approach

0

can any one tell me if there is a concept of server and client in udp as it is in tcp??

I have an option like,, as a syn packet needs to be first sent in tcp communication,,there is a server (listener who waits for syn packet) and client(who sends syn packet).but as this is not the case in udp,, there is no client and server..

am i right??

asked 20 Sep '13, 04:08

Raja%20Balaji's gravatar image

Raja Balaji
1446
accept rate: 0%


One Answer:

4

Yes, UDP uses clients and server just the same (example: DNS servers).

UDP is stateless, though, which means there is no session setup/handshake like with TCP. You can still implement client/server communication in a similar way, by putting the session handling in a protocol on top of UDP. TFTP does something like this by numbering its datagrams with a sequence number that is "acknowledged".

answered 20 Sep '13, 04:16

Jasper's gravatar image

Jasper ♦♦
23.8k551284
accept rate: 18%

If I don't implement any thing on the top of udp as you told, there is no client and server..whoever wants to send data can send it at any time.. is that right??

(20 Sep '13, 04:26) Raja Balaji
1

yes, anyone can send data at any time. Still you often have client/server concepts - the system offering services (like DNS) is a server, the system using that service is a client.

You do not need to have a state-aware connection to have a client/server construct. It's just a question of who is requesting information, and who is waiting for someone else to do the request.

(20 Sep '13, 04:44) Jasper ♦♦