St. Patrick's Day Socket/HTTP Server
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.
To run this server you will need 3 things:
1. You need to have Python installed!
2. You need to have Twisted Networking installed!
3. Server Source
This server should work with Flash 5+ and Flex 1.0 or higher including the new flash.net.Socket binary sockets.
Happy St. Patricks Day!
Cheers,
Ted Patrick :)

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 :)