## Indy network listening

Please discuss general Delphi programming topics here.

### Indy network listening

Hello.

Wondering if someone could help me.

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

Posts: 3
Joined: September 27th, 2010, 11:22 am

### Re: Indy network listening

Hello,

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

- 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

Posts: 29
Joined: October 5th, 2007, 3:56 pm