Home > database >  Three layers structure of C/S system to support multiple clients
Three layers structure of C/S system to support multiple clients

Time:09-29

Excuse me each ace:
I use PB9.0 + wsock32. DLL written three layers structure of C/S structure of the system, but now is only a single client, want to become more than the client, can you tell me the
Should where to begin? How to start?
(my idea is to use PB simulation multi-threading, do more than one event trigger, is that ok? If you can, ever successful example? How does the stability?

CodePudding user response:

Three layers structure of C/S structure? It is the B/S

PB is not achieve the real multithreaded!
There are a lot of ready-made middleware, EASERVER, iis

CodePudding user response:

Can multiple clients, for each client to create a new socket (socket)

CodePudding user response:

I am using is the socket, not B/S

CodePudding user response:

Problem for help ah, add points in detail:

I have now realized the socket client and server communications, but multiple client will appear problem, because I am in the Accept function such ClientSocket=Accept (ServerSocket, client);
So the latest connection is always covered before connection, all news is that the server to the client can only send the latest client connection,

CodePudding user response:

ClientSocket=accept (ServerSocket, client)
Will then create a socket, pb in general use a custom object to do
The ClientSocket and new socket connection, it is hard to say too clear, Windows socket programming is very confused I see
Probably is this meaning, you can see for the next example of the socket, and can also leave a E-mail, I send you a

CodePudding user response:

refer to the second floor xys_777 response:
to multiple clients, for each client to create a new socket (socket)


In this way, each tube communications again can.
I published a program that can see maybe useful to you.
http://download.csdn.net/source/1468852

CodePudding user response:

Learn!!!!!!!!!!

CodePudding user response:

Just got back on a business trip, or are in a confused, distress oh,

CodePudding user response:

Every time you create a new ClientSocket again
ClientSocket=accept (ServerSocket, client);

CodePudding user response:

Why oneself write socket to realize multi-layer application? Don't write than with easerver stable ourselves? Than using webservice more convenient, more efficient?
  • Related