Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ ReadTick()

void Terraria.Social.Steam.SteamP2PReader.ReadTick ( )
inline

Definition at line 87 of file SteamP2PReader.cs.

88 {
89 //IL_001f: Unknown result type (might be due to invalid IL or missing references)
90 //IL_00c4: Unknown result type (might be due to invalid IL or missing references)
91 //IL_00b5: Unknown result type (might be due to invalid IL or missing references)
92 //IL_00e5: Unknown result type (might be due to invalid IL or missing references)
93 //IL_00d3: Unknown result type (might be due to invalid IL or missing references)
95 {
96 while (_deletionQueue.Count > 0)
97 {
99 }
100 uint size;
101 uint size2 = default(uint);
102 CSteamID val = default(CSteamID);
103 while (IsPacketAvailable(out size))
104 {
105 byte[] array = ((_bufferPool.Count != 0) ? _bufferPool.Dequeue() : new byte[Math.Max(size, 4096u)]);
106 bool flag;
108 {
109 flag = SteamNetworking.ReadP2PPacket(array, (uint)array.Length, ref size2, ref val, _channel);
110 }
111 if (!flag)
112 {
113 continue;
114 }
115 if (_readEvent == null || _readEvent(array, (int)size2, val))
116 {
118 {
120 }
121 _pendingReadBuffers[val].Enqueue(new ReadResult(array, size2));
122 }
123 else
124 {
126 }
127 }
128 }
129 }
bool ICollection< KeyValuePair< TKey, TValue > >. Remove(KeyValuePair< TKey, TValue > keyValuePair)
static byte Max(byte val1, byte val2)
Definition Math.cs:738
Dictionary< CSteamID, Queue< ReadResult > > _pendingReadBuffers

References Terraria.Social.Steam.SteamP2PReader._bufferPool, Terraria.Social.Steam.SteamP2PReader._channel, Terraria.Social.Steam.SteamP2PReader._deletionQueue, Terraria.Social.Steam.SteamP2PReader._pendingReadBuffers, Terraria.Social.Steam.SteamP2PReader._readEvent, System.array, System.Collections.Generic.Dictionary< TKey, TValue >.ContainsKey(), System.Collections.Generic.Queue< T >.Count, System.Collections.Generic.Queue< T >.Dequeue(), System.Collections.Generic.Queue< T >.Enqueue(), Terraria.Social.Steam.SteamP2PReader.IsPacketAvailable(), System.Math.Max(), System.Collections.Generic.Dictionary< TKey, TValue >.Remove(), and Terraria.Social.Steam.SteamP2PReader.SteamLock.

Referenced by Terraria.Social.Steam.NetSocialModule.Initialize().