Article View: borland.public.cppbuilder.internet.socket
Article #4312Re: TCustomWinSocket Lock()!!!
From: Hans Galema
Date: Sat, 05 Mar 2005 10:33
Date: Sat, 05 Mar 2005 10:33
42 lines
2315 bytes
2315 bytes
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.
Technical Details
Message-ID:
<42298b47$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!proxad.net!npeer.de.kpn-eurorings.net!feed.news.schlund.de!schlund.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<4228f8c1$1@newsgroups.borland.com> <42290e8b$1@newsgroups.borland.com> <42297c51$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 11:33:02 +0100 From: Hans Galema <notused@notused.nl> User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) 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> In-Reply-To: <42297c51$1@newsgroups.borland.com> Content-Type: text/plain; charset=windows-1253; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 129.125.201.248 Message-ID: <42298b47$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1110018887 129.125.201.248 (5 Mar 2005 02:34:47 -0800) Lines: 42 Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!proxad.net!npeer.de.kpn-eurorings.net!feed.news.schlund.de!schlund.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail