Article View: borland.public.cppbuilder.internet.socket
Article #985Socket->Connections[i] client thread
From: eric chan
Date: Thu, 21 Jun 2007 09:27
Date: Thu, 21 Jun 2007 09:27
23 lines
1415 bytes
1415 bytes
Hi all,
We've a socket program that using Socket->Connections[i] to get the client
connections.
For Example,
for(int i = 0; i < skt->Socket->ActiveConnections; i++)
{
thread =
(TSktThread*)(skt->Socket->GetClientThread((TServerClientWinSocket*)(sktUser->Socket->Connections[i])));
.
.
}
We discovered that there may be times that there is client disconnection
occur
while it's inside the for-loop. It caused the Socket->Connections[i] return
false/invalid
client connection.
Anyone could help to giving me some hint on how to solve this?
Regards,
Eric Chan
Technical Details
Message-ID:
<467a43a2$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 11508e,7661514f3dae2e36,start X-Google-Attributes: gid11508e,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: "eric chan" <111ncchan@hket.com> Newsgroups: borland.public.cppbuilder.internet.socket Subject: Socket->Connections[i] client thread Date: Thu, 21 Jun 2007 17:27:54 +0800 Lines: 27 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.3028 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 X-RFC2646: Format=Flowed; Original NNTP-Posting-Host: 218.189.206.62 Message-ID: <467a43a2$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1182417826 218.189.206.62 (21 Jun 2007 02:23:46 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail