Article View: borland.public.cppbuilder.internet.socket
Article #1175atozedsoftware.indy.servers.tcp
From: column
Date: Tue, 24 Apr 2007 09:17
Date: Tue, 24 Apr 2007 09:17
54 lines
1673 bytes
1673 bytes
Hello, Is it good manner to synchronize TidTCPServer OnConnect, onDisconnect and OnExecute events using critical section as following: procedure Tinterf_TCP.AserverSocketConnect(AContext: TIdContext); begin ......... try EntercriticalSection(cs); Do some job in main thread finally LeaveCriticalSection(cs); end; end; procedure Tinterf_TCP.AserverSocketDisconnect(AContext: TIdContext); begin ......... try EntercriticalSection(cs); Do some job in main thread finally LeaveCriticalSection(cs); end; end; procedure Tinterf_TCP.AserverSocketExecute(AContext: TIdContext); begin ......... try EntercriticalSection(cs); Do some job in main thread finally LeaveCriticalSection(cs); end; end;
Technical Details
Message-ID:
<462dcb2f$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 11508e,cc808cb7ddb07b02,start X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit From: <column@takas.lt> Newsgroups: borland.public.cppbuilder.internet.socket Subject: atozedsoftware.indy.servers.tcp Date: Tue, 24 Apr 2007 12:17:34 +0300 Lines: 58 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: 82.135.244.123 Message-ID: <462dcb2f$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1177406255 82.135.244.123 (24 Apr 2007 02:17:35 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail