Article View: borland.public.cppbuilder.internet.socket
Article #4316Re: TCustomWinSocket Lock()!!!
From: Hans Galema
Date: Sat, 05 Mar 2005 11:19
Date: Sat, 05 Mar 2005 11:19
52 lines
3172 bytes
3172 bytes
qyte wrote:
> Hans Galema wrote:
>> Please do not quote a whole reply. Just some lines will do.
Please trim!. It is also very annoying that we have to scroll down
so much to read your reply.
> on the server on connect i send back an int to start the connection of
> the second client and so on. This works perfectly good.
So a TServerClientSocket connects. And upon connection waits to
receive an int and if it has done so it would activate another
TClientSocket connectiong to the same server ? And so on ?
> I have no
> problem with the assignments. the server socket read functions is the
> following and that works good as well. don't doubt about that.
>
> {
> if(Socket==sock[0])
> ClientSocketRead(ServerSocket,sock[0]);
> if(Socket==sock[1])
> ClientSocket_s2Read(ServerSocket,sock[1]);
> if(Socket==sock[2])
> ClientSocket_s1Read(ServerSocket,sock[2]);
> if(Socket==sock[3])
> ClientSocket_mRead(ServerSocket,sock[3]);
if(Socket==sock[0])
ClientSocketRead(ServerSocket,Socket);
if(Socket==sock[1])
ClientSocket_s2Read(ServerSocket,Socket);
if(Socket==sock[2])
ClientSocket_s1Read(ServerSocket,Socket);
if(Socket==sock[3])
ClientSocket_mRead(ServerSocket,Socket);
Why do all these functions need the ServerSocket as parameter ?
> just sometimes when i send data from both sides and responce is expected
> then there is confusion and they both stop transmiting. I don't know how
> could this be since sock[1] sends and sock[2] receives. when sock[1]
> receives above it considers only specific actions such as abort etc.
> That happens extremely Rarely.
To comment on that we need to know more about your code. Especially
your errorchecking around SendBuf() and ReceiveBuf().
Repeat: Please do not send back all this text if you reply.
Hans.
Technical Details
Message-ID:
<42299621$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!212.101.4.254.MISMATCH!solnet.ch!solnet.ch!newsfeed.freenet.de!easynews.net!easynet-isham!easynet.net!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> <42298b47$1@newsgroups.borland.com> <42299308@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 12:19:19 +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> <42298b47$1@newsgroups.borland.com> <42299308@newsgroups.borland.com> In-Reply-To: <42299308@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: <42299621$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1110021665 129.125.201.248 (5 Mar 2005 03:21:05 -0800) Lines: 52 Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!212.101.4.254.MISMATCH!solnet.ch!solnet.ch!newsfeed.freenet.de!easynews.net!easynet-isham!easynet.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail