<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
Kyley,<BR>
<BR>
No program design yet. Questions:<BR>
<BR>
1) Inside the thread - do I have to implement a timer event to periodically check the buffer (since there's no "data received" event)? <BR>
<BR>
2) What properties do I read to determine if there's received data available? <BR>
<BR>
3) Do I need to use another Indy component in conjunction with the TCPClient for the buffering etc?<BR>
<BR>
<BR>
Paul,<BR>
<BR>
I'll take a look at that site. Are you using ICS extensively?<BR>
<BR>
<BR>
Thanks,<BR>
Eric<BR>
<BR>
<BR>
<BR>
<BR><BR> <BR>
<HR id=stopSpelling>
<BR>
Date: Thu, 4 Dec 2008 09:21:03 +1300<BR>From: kyleyharris@gmail.com<BR>To: delphi@delphi.org.nz<BR>Subject: Re: [DUG] Indy Sockets - How to Receive Asynchronously<BR><BR>Indy is blocking, so typically on the client side, you would create a waiting thread that you sit the TCPClient inside and loop a readtimeout until the resultbuffer has some data. At that point produce a local event so that your main thread can grab the TCPClient and read the information.<BR>
<DIV><BR></DIV>
<DIV>without knowing your actual program design and how your TCP layer interacts with your main application its hard to offer any detailed advise, sorry. <BR><BR>
<DIV class=EC_gmail_quote>On Thu, Dec 4, 2008 at 9:14 AM, Paul <SPAN dir=ltr><<A href="mailto:paul.blommaerts@telenet.be">paul.blommaerts@telenet.be</A>></SPAN> wrote:<BR>
<BLOCKQUOTE class=EC_gmail_quote style="PADDING-LEFT: 1ex; BORDER-LEFT: #ccc 1px solid">
<DIV>
<DIV><FONT face=Arial>Indy works blocking only</FONT></DIV>
<DIV><FONT face=Arial>Use ICS instead, they work blocking or non blocking.</FONT></DIV>
<DIV><FONT face=Arial>check <A href="http://www.overbyte.be/">www.overbyte.be</A></FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>Paul</FONT></DIV>
<BLOCKQUOTE style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>
<DIV></DIV>
<DIV class=EC_Wj3C7c>
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV style="BACKGROUND: #e4e4e4; FONT: 10pt arial"><B>From:</B> <A title=eaa603@hotmail.com href="mailto:eaa603@hotmail.com">Eric A</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=delphi@delphi.org.nz href="mailto:delphi@delphi.org.nz">Delphi UsersGroup</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Wednesday, December 03, 2008 8:55 PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [DUG] Indy Sockets - How to Receive Asynchronously</DIV>
<DIV><BR></DIV>I have a situation where I need to communicate with a communications server using Indy TCP sockets. <BR> <BR>After sending the command the server returns an "OK" response with a second or two to acknowledge the acceptance of the command, however the reponse from the end device (returned via the server) may take several minutes to eventuate (or a else the sever returns a timeout message). I need to be able to buffer the responses, be aware of when new strings arrinve, and carry on with other tasks. This threading aspect shouldn't be an issue as I understand that Indy is naturally multitrheaded by design.<BR> <BR>I'm not familiar with using the Indy sockets and since there's no "received data event" (due to the nature of the design) I'm wondering how I capture the asynchronous responses sensibly?<BR> <BR>Does anyone have some code to show me how to use the Indy 10 TCPClient component in this way (for the receive part) ? Its probably pretty simple but I need to get my head around it quickly.<BR> <BR>Thanks<BR> <BR>Eric<BR><BR>
<HR>
Start searching now <A href="http://a.ninemsn.com.au/b.aspx?URL=http://www.allrealestate.co.nz/cgi-bin/rsearch?a%3Dbhp%26t%3Dren%26cu?rsf%3Dmsnz_textlink&_t=26000&_r=REANZ_tagline&_m=EXT">Rental properties galore.</A> </DIV></DIV>
<BR>
<HR>
<BR>_______________________________________________<BR>NZ Borland Developers Group - Delphi mailing list<BR>Post: <A href="mailto:delphi@delphi.org.nz">delphi@delphi.org.nz</A><BR>Admin: <A href="http://delphi.org.nz/mailman/listinfo/delphi">http://delphi.org.nz/mailman/listinfo/delphi</A><BR>Unsubscribe: send an email to <A href="mailto:delphi-request@delphi.org.nz">delphi-request@delphi.org.nz</A> with Subject: unsubscribe
<BR></BLOCKQUOTE></DIV><BR>_______________________________________________<BR>NZ Borland Developers Group - Delphi mailing list<BR>Post: <A href="mailto:delphi@delphi.org.nz">delphi@delphi.org.nz</A><BR>Admin: <A href="http://delphi.org.nz/mailman/listinfo/delphi">http://delphi.org.nz/mailman/listinfo/delphi</A><BR>Unsubscribe: send an email to <A href="mailto:delphi-request@delphi.org.nz">delphi-request@delphi.org.nz</A> with Subject: unsubscribe<BR></BLOCKQUOTE></DIV><BR><BR clear=all><BR>-- <BR>Kyley Harris<BR>Harris Software<BR>+64-21-671-821<BR></DIV><br /><hr />MSN NZ Travel <a href='http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Ftravel%2Emsn%2Eco%2Enz&_t=771497011&_r=MSN_NZ_travel_hmtagline&_m=EXT' target='_new'>Get inspired - dream, research, plan and book your next holiday online with </a></body>
</html>