Jump to content
alnickels

Indy question readbytes VS readstring

Recommended Posts

What are the advantages of readbytes vs readstrings or other methods that are used to read iohandlers from tidtcpclient in indy? 

Share this post


Link to post

There are no real "advantages" per-se, they are just different methods meant for reading different kinds of data.  Use whatever method is appropriate for whatever kind of data you are trying to read.  If you are reading textual data, then ReadLn(), ReadString(s)(), Capture(), etc are all suitable, depending on the formatting of the text.  If you are reading binary data, then ReadBytes() or ReadStream() are suitable.

Edited by Remy Lebeau

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×