DIGG IT!
3
Comments
Published
Friday, March 17, 2006
at
8:29 AM
.
First off Happy St. Patrick's Day! Some people spend all day celebrating but I wrote a server for you! This socket server has some unique features in that it supports Socket, XMLSocket, and HTTP over the same port and it can run a single application on multiple ports.
Ted on Twitter - @AdobeTed
Ted on Adobe Groups
Ted on LinkedIn
Ted on Facebook
Ted at Adobe
Thanks a lot!
Happy St. Patrick's Day!!
Let us know when IFBIN goes live :) Can't wait ...
dos
Really nice :) with XMLSocket you mean flash XMLSocket? If so, don't you need a final 0 byte at the end of the server response?
With XMLSocket you need to delimit with Null bytes or 0x00 in Python. With Socket you do not need any delimiter at all. Obviously you will need some way to denote which protocol is in use although storing a property into the connection makes this easy to work with.
Also on HTTP, simply write a file stream into the transport.write method and it will send the file. Also make sure to put a nice compatible header in there.
Cheers,
Ted :)