Attempting to transfer large strings from the client to the server

Hello there.

Today I was designing and programming an admin system, which also comes with a Lua executor. It went fine until I became stuck, I’m trying to transfer large strings from the client to the server (which the server sided script will have to read) but I’m failing… I tried using string values but that didn’t work. Sorry if this was too short but I’m just really stuck on what to do. All forms of feedback on this post and what to do will be highly appreciated.

Edit: I don’t know how to really word it so I can’t really search for it.

You will need to compress the strings if they are too large. The best choice would be LZW as it is fast enough to complete within a reasonable amount of frames.

Also, how large is that string even to break replication?

1 Like

You could try encoding the message, and then decoding it on the server. You could also try breaking the string into chunks and send them individually over a longer period of time to space out resources.

It can vary, the user can type their own code so it can be very large strings once they’ve hit the execute event.

I’m not sure what is your real problem, I guess the size of the string or / and the speed of transfer.

From my VB string handling experience:

I split big strings (e.g. some MB text file read) into smaller parts, so VB can work much faster with them. Size can be any, 1000 or 100000 char, depending on your experience with speed and the server capability.
Send them with remotefunction/remoteevent as a serie until end of the string and you are done.

If it takes too much time or server lags, consider syncing the string (local vs server side) somehow real-time. If it’s a code typed by the user, it shouldn’t be an issue to send the code real-time to server.

EDIT: I tested, a string with 300k character can be sent from client to server without any lag (using a simple RemoteEvent).

(Maybe I missed something?)