|
-
March 28th, 2001, 09:13 AM
#1
Client\Server apps
I have written a client server app which works fine. What I want is rather than to create a new instance of the server app each time a client connects, for all the clients to use the same instance. So effectively multiple clients connecting to one server. The reason for this is that I wish all the client's to share the same variable value which can be amended by each client.
Any ideas of how I can achieve this, or sample code.
Thanks.
-
March 28th, 2001, 03:54 PM
#2
Re: Client\Server apps
You can do it by creating a singleton object. One instance of the interface will be created and used by other processes. I don't know how you can do this in VB, in C++ you have a macro called
DECLARE_CLASSFACTORY_SINGLETON().
Use the MSDN and lookup singletons or book Professional ATL/COM programming by Richard Grimes might give you some ideas.
Jim Hewitt
Software Developer
Liberty Tax Service
www.LibertyTax.com
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|