0

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.

1 Answer 1

1

Functionality will likely be duplicated (depending on the protocol, of course), but that doesn't necessarily mean code has to be - that's what libraries are for.

2
  • yeah that's what I figured. I assume that even with libraries, both the client and the server will need their own link to a given library and use the same functions? Commented Jul 23, 2021 at 15:36
  • Correct. Though note that 'libraries' could be external or internal - often there's shared code for protocols in a codebase that implements both client and server. Commented Jul 23, 2021 at 16:52