SDT0653: RPC Payload Exceeded Size
| Property | Value |
|---|---|
| Rule ID | SDT0653 |
| Title | RPC Payload Exceeded Size |
| Category | Network |
| Severity | Warning |
Cause
The calculated static byte size of an RPC's parameter payload exceeds the recommended maximum MTU transmission frame sizes.
Rule Description
Large RPC payloads force packet fragmentation across the network layer. This dramatically introduces latency, increases packet drop ratios, and hinders overall network stability. Keep arguments tightly packed.
How to Fix Violations
Reduce the number of parameters, downsize large primitive types (e.g., use short instead of int), or stream large datasets using an dedicated chunked transfer streaming pipeline instead of a single RPC call.
Violation:
[RPC(PacketBroadcast.Server)]
public void RPC_SyncData([StringPacket(4096)] string config) { } // Exceeds threshold
Fix:
[RPC(PacketBroadcast.Server)]
public void RPC_SyncDataId(int configId) { }
When to Suppress Warnings
Info
This warning can be bypassed if the specific RPC is explicitly documented to run exclusively over local loopbacks (LAN architectures) or isolated initial initialization routines where frame drops are handled safely by standard TCP fallbacks.