//////////////// internal static void StoreSeg(int packetSetId, string jsonSeg, int jsonSegNum, int jsonSegMax) { lock (WorldPaintDataProtocol.MyLock) { if (!WorldPaintDataProtocol.JsonSegSets.ContainsKey(packetSetId)) { WorldPaintDataProtocol.JsonSegSets[packetSetId] = new Dictionary <int, string>(); } WorldPaintDataProtocol.JsonSegSets[packetSetId][jsonSegNum] = jsonSeg; WorldPaintDataProtocol.JsonSegCounts[packetSetId] = jsonSegMax; if (WorldPaintDataProtocol.AttemptReassembly(packetSetId)) { WorldPaintDataProtocol.JsonSegCounts.Remove(packetSetId); WorldPaintDataProtocol.JsonSegSets.Remove(packetSetId); } } }
protected override void Receive() { WorldPaintDataProtocol.StoreSeg(this.PacketSetId, this.JsonSeg, this.JsonSegNum, this.JsonSegMax); }