Indy network listening

Please discuss general Delphi programming topics here.

Indy network listening

Postby Klamber|ext. » September 28th, 2010, 1:33 am

Hello.

Wondering if someone could help me.
question is about Indy TcpClient.

Is it somehow possible to keep it listening for incoming data.
Or is there some other way..

I have a server that once in a while sends me some data to update program work.
If i use
Code: Select all
data:=idTcpClient1.readln;

then this hangs the whole program when no data is sent from server..
But i need a way to keep program working and when some data arrives then take action.
I need some event or smth.
Klamber|ext.
Member
Member
 
Posts: 3
Joined: September 27th, 2010, 11:22 am

Re: Indy network listening

Postby actalk » September 28th, 2010, 8:28 pm

Hello,

I just used indy in very simple examples.
I'm not an expert indy user.

for your spesific problem:
- you can try, IdAntiFreeze in Indy Misc.
- or you can use indy in multi threaded way.
- or you can examine timeouts to check if there is any data to read.
actalk
Junior Member
Junior Member
 
Posts: 29
Joined: October 5th, 2007, 3:56 pm


Return to Delphi Programming

Who is online

Users browsing this forum: No registered users and 3 guests

cron