Basic Client-Server Design for persistent connections?

Posted by cam on Stack Overflow See other posts from Stack Overflow or by cam
Published on 2010-04-03T17:19:19Z Indexed on 2010/04/03 17:23 UTC
Read the original article Hit count: 250

Filed under:
|

Here's as far as I understand it:

  1. Client & Server make connection

  2. Client sends server data

  3. Server interprets data, sends client data

  4. So on, and so forth, until client sends disconnect signal.

I'm just wondering about implementation. Step 2 and 3 are confusing to me, maybe I'm over-complicating it. Is there anymore to interpreting the data than a giant switch statement?

Any good books on client/server design? Specifically talking about multithreaded servers, scalability, and message design (byte 1 = header info, byte 2 = blah blah, etc)? Specifically geared towards C++.

© Stack Overflow or respective owner

Related posts about networking

Related posts about client-server