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

◆ OnPacketRead()

bool Terraria.Social.Steam.NetServerSocialModule.OnPacketRead ( byte[] data,
int length,
CSteamID userId )
inlineprivate

Definition at line 156 of file NetServerSocialModule.cs.

157 {
158 //IL_0006: Unknown result type (might be due to invalid IL or missing references)
159 //IL_001e: Unknown result type (might be due to invalid IL or missing references)
160 //IL_001f: Unknown result type (might be due to invalid IL or missing references)
161 //IL_0025: Unknown result type (might be due to invalid IL or missing references)
162 //IL_0031: Unknown result type (might be due to invalid IL or missing references)
163 //IL_0014: Unknown result type (might be due to invalid IL or missing references)
164 //IL_003f: Unknown result type (might be due to invalid IL or missing references)
165 //IL_004f: Unknown result type (might be due to invalid IL or missing references)
166 //IL_0095: Unknown result type (might be due to invalid IL or missing references)
167 //IL_0096: Unknown result type (might be due to invalid IL or missing references)
168 //IL_009b: Unknown result type (might be due to invalid IL or missing references)
169 //IL_009c: Unknown result type (might be due to invalid IL or missing references)
170 //IL_00ba: Expected I4, but got Unknown
171 //IL_00c2: Unknown result type (might be due to invalid IL or missing references)
172 //IL_00ed: Unknown result type (might be due to invalid IL or missing references)
173 //IL_00d2: Unknown result type (might be due to invalid IL or missing references)
174 //IL_00f6: Unknown result type (might be due to invalid IL or missing references)
175 //IL_00e4: Unknown result type (might be due to invalid IL or missing references)
176 //IL_00db: Unknown result type (might be due to invalid IL or missing references)
178 {
180 result.m_steamIDRemote = userId;
181 OnP2PSessionRequest(result);
183 {
184 return false;
185 }
186 }
188 if (connectionState == ConnectionState.Authenticating)
189 {
190 if (length < 3)
191 {
192 return false;
193 }
194 if (((data[1] << 8) | data[0]) != length)
195 {
196 return false;
197 }
198 if (data[2] != 93)
199 {
200 return false;
201 }
202 byte[] array = new byte[data.Length - 3];
203 Array.Copy(data, 3, array, 0, array.Length);
204 EBeginAuthSessionResult val = SteamUser.BeginAuthSession(array, array.Length, userId);
205 switch ((int)val)
206 {
207 case 0:
210 break;
211 case 2:
212 Close(userId);
213 break;
214 case 5:
215 Close(userId);
216 break;
217 case 4:
218 Close(userId);
219 break;
220 case 1:
221 Close(userId);
222 break;
223 case 3:
224 Close(userId);
225 break;
226 }
227 return false;
228 }
229 return connectionState == ConnectionState.Connected;
230 }
static unsafe void Copy(Array sourceArray, Array destinationArray, int length)
Definition Array.cs:624
override void Close(RemoteAddress address)
void OnP2PSessionRequest(P2PSessionRequest_t result)
ConcurrentDictionary< CSteamID, ConnectionState > _connectionStateMap

References Terraria.Social.Steam.NetSocialModule._connectionStateMap, System.array, Terraria.Social.Steam.NetServerSocialModule.BroadcastConnectedUsers(), Terraria.Social.Steam.NetServerSocialModule.Close(), System.Collections.Concurrent.ConcurrentDictionary< TKey, TValue >.ContainsKey(), System.Array.Copy(), System.length, and Terraria.Social.Steam.NetServerSocialModule.OnP2PSessionRequest().

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