- Home /
What is the size limit of an byte[] through RPC ?
I heard 4096, i heard unlimited, what is the truth ? :)
It's not to send 500Gb of data, but i want to make sure that 2 or 3Mb data can do it without problems.
thanks a lot.
Answer by BeardedManBrent · Jul 06, 2013 at 01:50 AM
There is no size limit (at least in 4.x as far as I know). Playing around with it, I was able to send 60mb in one shot... though it was not very fast...
I would like to append to this, after experience, that you will want to chunk the byte array into segments and send pieces over time (but not too fast). Possibly use an RPC on the other end to request for the next chunk once it receives the data.
That's a good way, I will looking for it next time (Yeah, the question is a bit... old :p)
Answer by devang024 · Feb 03, 2018 at 01:15 PM
Although , its very old post but new version users might benefit from my answer.
The following is runtime error I recieved when sending an image over networkRPC to other. "NetworkWriter WriteBytes: buffer is too large (2519800) bytes. The maximum buffer size is 64K bytes."
So, 64K is cap in sending the byte[] to RPc and Cmd funtions.
Thank you meat5000 for sharing those links, I didn't know it could be configured, But I guess, its updated in new versions, because back in 2014s and 2015s, I dont think it was a configurable part. Anyway, Thanks a lot once again.
Your answer
Follow this Question
Related Questions
View ID AllocatedID: 50 not found during lookup. 0 Answers
RPC only called in editor 0 Answers
Can I use RPC calls in an Update function ? 1 Answer
Deleteing Objects created by Clients 0 Answers
Network - Killing Player, Then Respawn - Issue with RPC 1 Answer