Simple client-server source code
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   armatage_shanks
Posted On:   Thursday, July 11, 2002 01:19 AM

			

Anybody can tell me, where I could find a simple source code for server-multiple client. I need it as my reference for my final year project. All I need is 1 server that can access by 1 client in a time. If there are other client want to connect to this server, the server will denied and he need to wait till the 1st client finished with the server. That's mean other client need to queue for their turn. Please somebody give me an idea or guidence. Thank you

Re: Simple client-server source code

Posted By:   Anonymous  
Posted On:   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.

Renato.
About | Sitemap | Contact