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

fixed

 

From: Nathan Martin [mailto:notifications@github.com] 
Sent: Tuesday, November 25, 2014 12:47 PM
To: GarageGames/Torque3D
Cc: Vincent Gee
Subject: Re: [Torque3D] Asset downloader (#959)

 

In Engine/source/app/net/netFileServer.cpp:

> +
> +/*********************************************************************
> +This event class is used to break up the transmission of the file list
> +to each client.  This allows multiple clients to receive there file
> +list at the same time.
> +*********************************************************************/
> +class FileList_SysEvent : public SimEvent{
> +   public:
> +      S32 Idx;
> +      S32 fileCount;
> +   FileList_SysEvent(S32 idx,S32 filecount )
> +   {
> +      Idx = idx;
> +      fileCount = filecount;
> +   }
> +   void process(SimObject* obj)

Braces off by one indention in this function.

—
Reply to this email directly or view it on GitHub <https://github.com/GarageGames/Torque3D/pull/959/files#r20880280> .  <https://github.com/notifications/beacon/ACUNZNgDUuc0QlkiTRiGBeklXwW3oOkMks5nRLf5gaJpZM4DAN4b.gif>