realbasic-nug
[Top] [All Lists]

Re: Transmitting Binary

To: "REALbasic Network Users Group" <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Transmitting Binary
From: "Joseph J. Strout" <joe at realsoftware dot com>
Date: Wed, 17 Dec 2003 11:00:31 -0600
References: <34DE5BB0-303E-11D8-AAA8-00039340AFEC at thezaz dot com> <6BFE4D50-3040-11D8-B05A-000A95A9544A at shaw dot ca> <a05300b07bc061bf85795 at [10 dot 10 dot 13 dot 3]> <6CF779AE-30AE-11D8-B05A-000A95A9544A at shaw dot ca>
At 9:31 AM -0700 12/17/03, Norman Palardy wrote:

I've been Base64ing all the binary I send over a network socket and so far I can send TIFF's just fine.

All that does is make your transfers take longer. Sockets are a full 8-bit transmission mechanism, no need for Base64 here.

I could not make this work any other way.

I'd like to see it not working without it. One of our standard socket benchmark apps sends arbitrary files from one computer to another, and we don't do anything to them at all -- just read them with a BinaryStream, and write them directly to the socket. Works fine.

So, I changed the protocol from purely Binary to transmitting XML
The TIFF is now a CDATA section in the XML, and does require Base64 otherwise the binary in the CDATA can cause the XML tag to be misinterpreted.

Well yes, to use it with XML you certainly do, but just to transmit a TIFF file you don't.

Not a big hit for me, but a pure binary protocol I could not make work.
And, the upside of the XML is that I can simply telnet to my server, send the commands I want and debug the output that way.
Not having the binary work has actually made it easier to debug.

I can certainly appreciate that.

Cheers,
- Joe

--
,------------------------------------------------------------------.
|    Joseph J. Strout           REAL Software, Inc.                |
|    joe at realsoftware dot com       http://www.realsoftware.com        |
`------------------------------------------------------------------'

- - -
Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>