Home > Software engineering > SERVER client access client corresponding multiple class object, how to do?
SERVER client access client corresponding multiple class object, how to do?
Time:11-23
Ask a question: SERVER side to accept the client's connection, each client is in the case of a task is different, so the design for multiple CClientObject classes, such as: CClientObject1, CClientObject2 ~ ~ ~
How to access the CLIENT design, according to different requirements to instantiate a CLIENT class object? The train of thought about how to implement? The SOCKET sClient=: : the accept (); //to do... According to different requirements, instantiate a client class object,
In fact, is the client's different business logic is different, the underlying socket communication no difference, of course, how to realize the different clients different business logic?
CodePudding user response:
Receiving/sending and processing of data processing logic on separate, the elaboration on the business logic of data processing, to the different function modules to deal with,