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

◆ IsValidCloseStatus()

static bool System.Net.WebSockets.ManagedWebSocket.IsValidCloseStatus ( WebSocketCloseStatus closeStatus)
inlinestaticprivate

Definition at line 1142 of file ManagedWebSocket.cs.

1143 {
1144 if (closeStatus < WebSocketCloseStatus.NormalClosure || closeStatus >= (WebSocketCloseStatus)5000)
1145 {
1146 return false;
1147 }
1148 if (closeStatus >= (WebSocketCloseStatus)3000)
1149 {
1150 return true;
1151 }
1152 if ((uint)(closeStatus - 1000) <= 3u || (uint)(closeStatus - 1007) <= 4u)
1153 {
1154 return true;
1155 }
1156 return false;
1157 }

Referenced by System.Net.WebSockets.ManagedWebSocket.HandleReceivedCloseAsync().