[Gambas-user] Using a socket to download an image. Please Help ^_^
Benoit Minisini
gambas at ...1...
Mon Dec 1 14:35:00 CET 2008
On dimanche 30 novembre 2008, Robert Moss wrote:
> The ImgData stops writing when it comes to a byte with value &H00 (I
> believe) although I'm pretty sure it doesn't matter how I write the stream,
> once it's read as a String, it becomes terminated by any NULL char. So my
> question is this: How do I read the data from the Socket in binary, write
> it to a stream file in binary, but STILL I MUST be able to split the data
> based on the 2 CRLF's
>
Strange, it should work. I mean: zero bytes in a string does not matter, as
soon as the string is not passed through some methods of components written
in C/C++, because there strings sometimes needs to be zero terminated.
You can read/write arrays from streams if you need: they all have a Read
method and a Write method for that.
Anyway can you send me your full source code?
--
Benoit Minisini
More information about the User
mailing list