Jump to content
Registration disabled at the moment Read more... ×
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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×