Nice odd tcpip socket question.
- From: Dodgy <Dodgy@xxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 31 May 2005 14:23:29 +0100
I'm trying to work with client sockets, done this loads of time
before, and happily use the Indy 9 components in D5 Ent.
Today I hit a snag... The spec I have to conform to has fixed length
data packets, with no terminating character.
I tried to use idtcpclient.readln, but I can't give it a termination
character, and it appears not to return anything until it finds the
termination character, even after the timeout has exceeded and it's
returned control to the app.
I really need to be able to say "read x bytes, but give up waiting
after y seconds", something I though readln would do admirably. Alas
no. None of the other read methods allow a timeout to be set, and I
really need to keep this side under control as the eventual deployment
will be in a thread, and I don't want threads left laying about hung
because they have a tcpip connection, but for some reason the server
hasn't sent them the required number of bytes (i.e. the server process
has gone wrong).
Any ideas?
Dodgy.
--
MUSHROOMS ARE THE OPIATE OF THE MOOSES
.
- Follow-Ups:
- Re: Nice odd tcpip socket question.
- From: Marco van de Voort
- Re: Nice odd tcpip socket question.
- Prev by Date: Re: distance between lats and lons
- Next by Date: Re: Nice odd tcpip socket question.
- Previous by thread: String from res file
- Next by thread: Re: Nice odd tcpip socket question.
- Index(es):
Relevant Pages
|
|