Board index » delphi » How to send Binary Data Stream using Indy Socket Server

How to send Binary Data Stream using Indy Socket Server

I am working with a protocol that sends a 50 byte header with the first 4
bytes indicating
the entire length of the binary data to follow. I am attempting to use the
Indy Socket
Server Component to read the header and data into a stream for processing.
I would
like to know the best method to capture the header then retrieve the correct
amount of data from the buffer into a Tmemorystream.  (code is greatly
appreciated!)

Thanks in advance.
Bryan

 

Re:How to send Binary Data Stream using Indy Socket Server


B...@scott.net (Bryan Lipham) wrote in <934tr6$l...@bornews.inprise.com>:

Quote
>I would
>like to know the best method to capture the header then retrieve the correct
>amount of data from the buffer into a Tmemorystream.  (code is greatly
>appreciated!)

See the docs for ReadStream. Thats exactly what it does.

--
Chad Z. Hower (Kudzu) - Church Hill, TN - Team Indy
      "Programming is an art form that fights back"
Forget the Y2K problem, Lets fix the W2K problem.
http://www.pbe.com/Kudzu/ - Free Delphi/CBuilder components and articles

Other Threads