Thanks for your reply, Bruce, but I am still not...... what is the opposite of confused? Effused? Suffused?
WholePacket always prepends that LONG when .WholePacketUseLengthField=1.
Will a packet look like this:
123456789<CRLF>
Here is the contents of the packet, whatever that packet contains.
Or like this:
123456789Here is the contents of the packet, whatever that packet contains.
I have to cut off either 6 (the 4-byte LONG plus <13><10>) or 4 byte (just the LONG) in front.
With .WholePacketUseLengthField=0 there is nothing to cut.....
... wouldn't that be easier to handle?
<< ...do a .Base64Encode()
> of course, it all depends on the system you are talking to, but there's no real reason
> to do a Base64encode. The internet does binary just fine.
hmmm, in my previous tests the binary files seem to not arrive completely. On the other hand, the files weren't the same after I tried using Encode/Decode. I sent JPGs for testing and image-viewer complaint about "invalid file"<headscratch>
>> Is such a Simple-C/S combo reliable for this task, or would a Web-C/S combo be the better choice?
> For sending and receiving files, I'd personally use a WebServer / WebClient combination.
> This includes a HTTP header with all the information, and is a standard internet protocol.
> Plus it supports Binary, so will be smaller than base64encoded (by about a third.)
Again I am confused.... Beside the fact that I was not able to send unaltered binaries, but having a prepended HTTP-header inside my packet would require to remove that header, before this packet can be stored as a binary (PDF) on the server-side.
POST / HTTP/1.0
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
Accept-Language: en
User-Agent: Mozilla/5.0 .....
Host: 127.0.0.1:88
Content-Length: 52
Connection: Keep-Alive
§$%&/&%$§$$&% .. more binary code....
My basic idea was this:
- Client says: Server, wake up, here comes 2012-04-15_blabla.PDF
- Server says: okay, I listen now
- Client says: <BIG_PACKET_SENDING>
- Server: stringtheory.SaveFile('2012-04-15_blabla.PDF', Append)
and at the end I have a PDF (or whatever) more on the server, but did not work that way I thought.
I will do some more testing....... and let you know about my results.