How to read a single character with timeout using Indy 9?

Giganews Newsgroups
Subject: How to read a single character with timeout using Indy 9?
Posted by:  Mark (mkhuebn…@gmail.com)
Date: 19 Mar 2007

I'm currently using TIdTCPConnection.ReadChar to read a single
character from the Winsock port.  Unfortunately, ReadChar does not
allow for timeouts to occur while waiting for that character to come
in.  Is there any way to read a single character and specify a
timeout?  If so, which functions should I use?  Thanks in advance!

Replies