Article View: borland.public.cppbuilder.internet.socket
Article #2504Re: IdUDPClient - OnRead Event
From: Remy Lebeau (TeamB)
Date: Tue, 04 Apr 2006 17:35
Date: Tue, 04 Apr 2006 17:35
33 lines
1965 bytes
1965 bytes
"Darl" <Darl@nospam.com> wrote in message news:44326ff8@newsgroups.borland.com... > Am not using SendCmd on the client side though I use commandhandler > on the server side, my client send request to the server using WritenLn() and ReadLn. Then simply move the ReadLn() to a separate thread or timer. > Can you just give a simple code so I can undersatnd better. Look at the source code for TIdTelnet. It is a threaded reader, since telnet data is asynchronous. > How about having two TIdTCPClient on the client, while I use one > to send Request to the Server the Other is in a Thread with constant > ReadLn() loop. You do not need to use two sockets for that, and that is wasted resources anyway. > if possible to have one TCPClient bimd to two different port? That is not possible. > cand I read on one port and write on the Other port asynchronously. You do not need two sockets for that. You can have one thread writing to 1 socket while another thread reads from the same socket. Gambit
Technical Details
Message-ID:
<4432af55@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news4.google.com!newshub.sdsu.edu!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<44311b8a@newsgroups.borland.com> <4431598b$2@newsgroups.borland.com> <44326ff8@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,112c80b4d484b6b5 X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.cppbuilder.internet.socket References: <44311b8a@newsgroups.borland.com> <4431598b$2@newsgroups.borland.com> <44326ff8@newsgroups.borland.com> Subject: Re: IdUDPClient - OnRead Event Date: Tue, 4 Apr 2006 10:35:31 -0700 Lines: 35 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 68.69.17.41 Message-ID: <4432af55@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1144172373 68.69.17.41 (4 Apr 2006 10:39:33 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news4.google.com!newshub.sdsu.edu!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail