maxPacketSize | The largest packet size that the network allows, in bytes. |
short The maximum amount of bytes that can you can safely send over the network so they fit in the given maximum packet size after encryption.
Gets the safe un-encrypted maximum payload size for a given maximum packet size.
Use this function to get the maximum amount of un-encrypted bytes you can send over the network so that they fit into a given maximum network packet size after encryption. This function calls the provided encryption plugin loaded through NetworkTransport.LoadEncryptionPlugin to get the safe size, because the size depends on the padding and extra header information that the encryption algorithm adds to the data.