Article View: borland.public.cppbuilder.internet.socket
Article #4313Re: TCustomWinSocket Lock()!!!
From: qyte
Date: Sat, 05 Mar 2005 11:01
Date: Sat, 05 Mar 2005 11:01
55 lines
2667 bytes
2667 bytes
Hans Galema wrote: > qyte wrote: > > Please do not quote a whole reply. Just some lines will do. > >> Let's say that i have four TClientSockets And 1 TServerSocket; > > > In one application ? Or one server application and four client > applications ? > > > During > >> their OnConnect events i have declared the following: >> TCustomWinSocket *sock[4]; > > > Are you doing that both for a TClientSocket AND a TServerSocket ? > If so, why ? > >> In The Server sock[ActiveConnections-1]=Socket; > > > Please tell when you execute that statement. ActiveConnections > often does not contain the right amount immediately. > >> and in each client i assosciate them like sock[0]=Socket... > > > I do not understand why a client has to bother with other > clients. > >> Because I Know the order in which they connect. > > > Even if you know that. Never trust the Connections[] array > for keeping that sequence. > >> how can i be certain that when i call sock[0]->SendBuf No other can >> read(mainly) or write at the same time. It is abvious that they are >> all using the same port. > > > Please explain first what should happen. It looks as if you > have a TServerSocket and upon connection of a client you use > a TClientSocket to communicate with that client ? > > That would be a strange construction. > > Hans. it is in one sole application. But in one end only the server is active and on the other the four clients.
Technical Details
Message-ID:
<42299193$3@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!feeder2.on.meganewsservers.com!meganewsservers.com!textfeed1.on.meganewsservers.com!38.119.100.83.MISMATCH!news-out.nntp.be!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<4228f8c1$1@newsgroups.borland.com> <42290e8b$1@newsgroups.borland.com> <42297c51$1@newsgroups.borland.com> <42298b47$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,9c76e7cb52ebcfdd X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit Date: Sat, 05 Mar 2005 13:01:37 +0200 From: qyte <gyte@vivodinet.gr> User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.internet.socket Subject: Re: TCustomWinSocket Lock()!!! References: <4228f8c1$1@newsgroups.borland.com> <42290e8b$1@newsgroups.borland.com> <42297c51$1@newsgroups.borland.com> <42298b47$1@newsgroups.borland.com> In-Reply-To: <42298b47$1@newsgroups.borland.com> Content-Type: text/plain; charset=windows-1253; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 83.171.210.195 Message-ID: <42299193$3@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1110020499 83.171.210.195 (5 Mar 2005 03:01:39 -0800) Lines: 55 Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!feeder2.on.meganewsservers.com!meganewsservers.com!textfeed1.on.meganewsservers.com!38.119.100.83.MISMATCH!news-out.nntp.be!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail