You are viewing a single comment's thread from:

RE: Minecolonies & Structure Queues

in #utopian-io7 years ago

What's the problem with compressing the message, converting the compressed message into a byte array, then sending it piecemeal? After you have received all the pieces then you can uncompress on the server. It seems like that would be a reasonable approach.

Otherwise, what kinds of issues did you run in to?

Sort:  

Yeah, definitely, I could've compressed it at the beginning once and then cut it into pieces.
The reason I didn't do this is since I didn't want to break the code which was using this message beforehand.
The message didn't change, at all. Only the way I handle it on the serverside and the way I call it from client side.

(Calling it from server side or receiving on the client side didn't change)

I see, I guess to avoid breaking dependencies you could copy the message and then prepare it for sending, that way the whole operation is isolated from client-side processes (unless you are really constrained for computational time). Though the effort that entails is only justified by the strain the structure size imposes on bandwidth.