Ted Patrick > { Events & Community } > Adobe Systems


St. Patrick's Day Socket/HTTP Server

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

3 Responses to “ St. Patrick's Day Socket/HTTP Server ”

  1. # Anonymous Anonymous

    Thanks a lot!

    Happy St. Patrick's Day!!

    Let us know when IFBIN goes live :) Can't wait ...

    dos  

  2. # Anonymous Fernando

    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?  

  3. # Blogger Ted Patrick

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

Post a Comment



© 2008 Ted On Flash