networking – Do I have to duplicate implementations on a client server udp application

I think the question is pretty straight forward but just to clarify, if the client and server are separate machines and need to be able to communicate with each other, does that mean that certain aspects such as synchronization, ack packets, re transmitting, timeouts, etc need to duplicated between the client and server?

For example, if i creating a polling program that switches between sending and receiving messages, would I need to have the same service on the client and the server?

I know somethings will be different. For example the way a client handles inputs from the server may be different then how the server processes input from the client.