
06-11-2009, 09:43 PM
|
|
the fake one
|
 |
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
|
|
Sending data
|
Basically, here's my problem:
I have an object clientside which I need to send serverside, so I use object.saveVarsToArray(false). When the object is received serverside, it's loading it, then saving it to a text file (for this example, data/test.txt).
Then, on demand, I need a player to be able to load the object that was saved serverside. Normally I would loadVars() the file, then saveVarsToArray(false) and send it clientside, where it can be loaded to recover the object.
However, I will be sending potentially huge amounts of data. I doubt that I will exceed the limits of triggerclient/server, but I want it to be robust in case it should happen.
As far as I know, triggerclient/server will cut off the paramaters, rather than split into multiple packets (this may be the wrong word, correct me if so) and waiting for all of them to arrive to trigger the action. If this is the case, how can I send large amounts of data back and forth (client -> server and server -> client) without losing any of it? I suppose I could split the trigger up manually, but that would be a bit messy, and I'm hoping there's a better way.
Any suggestions? |
|
|
|