GarageGames/Torque3D — pull request #959 by Winterleaf (2014-11-25 04:53:51+00:00)
Title: Asset downloader

This PR provides a mechanism for synchronizing files between the client and the server.
It does allow users to upload content to the server if the file transfer connection is left connected.
The code is implemented using the TCPObject as the base class. I have taken the liberty to make a couple of TCPObject's functions virtual so I could overload them for binary transfer.
I also modified fileSystemFunctions.cpp and took the body of code out each of the defineconsolefunctions and put them in a function and wrapped all the functions inside a namespace. I also added a header file which can be included so that programmers are able to access those functions from anywhere in the code base.
Since the FileXfer occurs over TCP, I am able to use the same port which is used for the game. This is because T3D runs its network over UDP and this PR is implemented over tcp.

You are able to specify the files you want to include for download by editing the core/Scripts/server/fileXferServer.cs file.

Two ways of adding files to be available for download:

LoadPath (Pattern, Recursive, multiMatch, Verbose) and works just like the FindFiles file searching.
LoadFile (filename) - It will check if the file exists, if it exists it will add it to the download.

Let me know if you find any errors.

Vince Gee
Winterleafentertainment.com