Article View: borland.public.cppbuilder.nativeapi
Article #8845Re: Server and Client
From: Hans Galema
Date: Thu, 09 Sep 2004 20:26
Date: Thu, 09 Sep 2004 20:26
77 lines
4142 bytes
4142 bytes
JD wrote: > At the moment, I only need the server application to track > clients and send/recieve messages to/from clients. TServerSocket knows at all times how many clients are connected. TServerSocket can send a message to a specific client as answer on a request of that client. TServerSocket can also just send a message to any client. What kind of clients do you need ? A client that only expects a message from a server if it asks the server, or a client that can accept messages initiated from the server ? >>Then the client would be on the same computer as the server!? > > Not exactly what I meant. If it's a stand alone PC, the server > application would be running on the same machine as the client > application - same way that InterBase works. In my opinion the client would then be on the same computer as the server. > All of the stuff that I was reading .... COM, DCOM, ect. 'If > you want to do this ... use that. If you want to do that ... > use this'. Where do you need COM or DCOM for ? If you use TServerSocket/TClientSocket for communication between your server and clients then do not use COM or DCOM between them. Of course your server may use COM or DCOM with any application it wants. But not with the clients. Also clients may use it, but not to communicate with the server. Using COM and DCOM cannot influence socketcommunication. >>TServerSocket/TClientSocket are unaware of dial-up, network or loop-back. >>You do not have to care for that. It's all done for you by the OS. > > That's good to know. Makes me wonder why Midas exists though. What has Midas to do with communication between your server and client ? If there are three parties in Midas then in any communication there you can speak about a server and a client. > I don't get the process. I get that it (the server portion of > my app) Why are you speaking about the server 'portion'? The serverportion is one app. A client is another app. > has to be installed on the server (machine) but I don't > understand how I can hardly imagine that if you write an application with c++builder that you cannot manage to let it run on any machine you want. > and I also don't understand how the server app > gets started. Windows has about nine ways to start an exe at boot. It can use the registry indeed. But the simplest way is to place a shortcut to your serverapp in the 'StartUp' directory. You can do that by hand. I can hardly imagine that you never did that with any application. > From your response, I'm guessing that an install writes to the > registry so that the server app is started when the server is > booted. If that's correct, then I'm still confused how the > install would write to the servers registry. Have a look at TRegistry. > That's my problem, I simply don't know enough to know what to > ask. Better forget about installing and autostart first. Just start to write you server and client. See you in the socket ng. Have a look at the chat example first. Then trow it away as the implementation is rudimentary. Hans.
Technical Details
Message-ID:
<4140bbb9@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<412f395f$1@newsgroups.borland.com> <41406c0e$1@newsgroups.borland.com> <41409a61$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,eb72ec3a40b04705 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit Date: Thu, 09 Sep 2004 22:26:13 +0200 From: Hans Galema <dontusethis@dontusethis.nl> User-Agent: Mozilla Thunderbird 0.7 (Windows/20040616) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: Server and Client References: <412f395f$1@newsgroups.borland.com> <41406c0e$1@newsgroups.borland.com> <41409a61$1@newsgroups.borland.com> In-Reply-To: <41409a61$1@newsgroups.borland.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 129.125.201.248 Message-ID: <4140bbb9@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1094761401 129.125.201.248 (9 Sep 2004 13:23:21 -0700) Lines: 77 Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail