We help IT Professionals succeed at work.

Indy question

gmayo asked
Last Modified: 2010-04-05
Quick question: I'm converting a program from TClientSocket/TServerSocket to Indy (which I've never got round to using yet) and was wondering:
1. Does it include buffering? I need to send 100s of K on startup and I need to manually buffer it with TClientSocket, so do I need do the same with Indy?
2. Socket messages are not delimited, ie I need to use STX/ETX type of protocol. Do I need do that in Indy?
3. Are Indy messages generally guaranteed to arrive, barring network failure? And in the same sequence as sent?

Preferably a Yes/No to those questions rather than a "read this link" please!


Geoff M.
Watch Question

Software Engineer, Advisory
Top Expert 2005
This one is on us!
(Get your first solution completely free - no credit card required)


Hmmm, seems I might not get quite so much benefit out of dumping sockets as I thought. Maybe just a slight rewrite using sockets would be better in my case.

#2 surprises me a little, from what I've read on EE. Several times people have said that you get whole messages in one block. I assume that they are wrong. I had to prove to one of my programmers that this was the case with serial ports (who has since found an alternative career, to put it politely), so it wouldn't surprise me that others assume the same.


Geoff M.
Russell LibbySoftware Engineer, Advisory
Top Expert 2005


Regarding (2)

Many people make assumptions as to the 1 send = 1 read, because it "seems" to work (which it usually does when sending small packets of data). This can be a fatal application flaw if coded based on this assumtion, because it is just PLAIN WRONG. The underlying transport makes no warranty as to where/if/how the data will be split; the only guarantee it makes (regarding transport) is that if the result of the api is success, the data will have been delivered.

I found this out the hard way quite a few years back... ;-)



Tell me about it! I've always been telling people to *expect* split packets but thought maybe I was wrong after reading some posts on EE. Thanks.
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.