Re: Simple client-server source code
Wednesday, August 14, 2002 12:30 AM
I have built a successful client pooling, where the server waits for a client response in order to have a "proceed" for logging the customer in question. In other words, the clients are processed only once they tell the server to proceed with their logging in.
The logic goes something like this:
- Build a Stub to the client that can use RMI to set a "proceed" value to true on the server side.
- The server is listening for a connection, and when one occurs it waits for that specific client to say it should proceed.
- Once a connection is made, a Vector should keep a copy of that connection, so that in can identify the client.
- Once the client in question sets the proceed, then the server will process the login for that specific client.
I hope this brief explanation helps.