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

◆ SelectFileDescriptor()

static void System.Net.Sockets.Socket.SelectFileDescriptor ( IList socketList,
Span< IntPtr > fileDescriptorSet,
ref int refsAdded )
inlinestaticpackage

Definition at line 4532 of file Socket.cs.

4533 {
4534 int num;
4535 if (socketList == null || (num = socketList.Count) == 0)
4536 {
4537 return;
4538 }
4539 int num2 = (int)fileDescriptorSet[0];
4540 if (num2 == 0)
4541 {
4543 socketList.Clear();
4544 return;
4545 }
4547 {
4548 for (int i = 0; i < num; i++)
4549 {
4551 int j;
4552 for (j = 0; j < num2 && !(fileDescriptorSet[j + 1] == socket._handle.DangerousGetHandle()); j++)
4553 {
4554 }
4555 if (j == num2)
4556 {
4557 socket.InternalSafeHandle.DangerousRelease();
4558 refsAdded--;
4559 socketList.RemoveAt(i--);
4560 num--;
4561 }
4562 }
4563 }
4564 }
static void SocketListDangerousReleaseRefs(IList socketList, ref int refsAdded)
Definition Socket.cs:3836

References System.Collections.Generic.Dictionary< TKey, TValue >.Clear(), System.Collections.Generic.Dictionary< TKey, TValue >.Count, System.Net.Sockets.Socket, and System.Net.Sockets.Socket.SocketListDangerousReleaseRefs().

Referenced by System.Net.Sockets.SocketPal.Select().