Click here to Skip to main content
15,880,543 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Greetings, i'm new in Sockets, and i have a some theoretical questions regarding Client <-> Server communication.

Question is about message type and format.

1. If i will use a string with delimeters as a message, for all client-server operations, is it a good practice for a high load project?
Example:
"CMSG_AUTH:Login:Password"

2. I've heard, that somebody using opcodes as server return command. Should i use string and opcodes in tandem? And how? Which design patterns would be good to learn, for a internal server architecture?
(I know, it's a stupid question, but i really interested in server development, and it's my dream to write good, scalable server application). I don't want to use WCF, i want to make it from scratch, just to understand how it works.

2. Which books will be good to read reagarding current subject?

Thank you!
Posted
Updated 27-Aug-14 2:16am
v3

1 solution

1. Yes, just the way HTTP does it so no problem.
2. Not sure I understand the question. You can just use strings containing codes plus text as responses; again the same as HTTP.
2(again). Not really sure but UNIX Network Programming[^] contains a wealth of useful information.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900