private OnReceivePayload ( long curTime, ushort sequence ) : bool | ||
curTime | long | |
sequence | ushort | |
return | bool |
internal bool OnReceivePayload(long curTime, ushort sequence)
{
return this.traffic.OnReceivePayload(curTime, sequence);
}
private void HandlePayload( NetPeer peer, byte[] buffer, int length) { if (peer.IsConnected == false) { return; } // Read the payload bool success = NetEncoding.ReadPayload( CreateEvent, peer, buffer, length, out ushort payloadSeq, out NetEvent evnt); // Validate if (success == false) { NetDebug.LogError("Error reading payload"); return; } // Enqueue the event for processing if the peer can receive it if (peer.OnReceivePayload(Time, payloadSeq)) { eventOut.Enqueue(evnt); } }