[Twisted-Python] Transfering a file through xml sockets

Alvin Delagon adelagon at gmail.com
Tue Nov 27 18:21:46 MST 2007


He might be talking about jabber xmlstream. Yeah I do agree encapsulating
the file in an xml could introduce overhead (I remember doing this in my
former company where the file in encoded in base64). Why don't you just
transfer the file via http/ftp? Send an xml to the client containing the
address of the file and let the client application do the fetching.

On Nov 28, 2007 2:24 AM, Atilla <theatilla at gmail.com> wrote:

> Are you referring to ActionScript's XMLSocket or just some generic TCP
> connection that expects XML to be transferred over it? Are you
> communicating with something existing and if not - why do you need to
> use XML-based communication to transfer a file?
>
> Unless there is some specified format, you can transfer it any way you
> find convenient, just make sure you think of the corner cases and the
> size of the file. Some XML parsers will not be happy if they have
> elements with huge inner data nodes. I guess encapsulating all the
> file's details in XML elements would be enough. Send the filename,
> file size, a digest of the file for verification and/or debugging,
> (the usual md5 should do the trick) and the file content itself,
> encoded in a convenient way - say with base64. Mind that this will
> have additional overhead when transferring the file.
>
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-python/attachments/20071128/6d868594/attachment.html>


More information about the Twisted-Python mailing list