Adding reference source for System.Net
[mono.git] / mcs / class / referencesource / System / net / System / Net / WebSockets / WebSocketCloseStatus.cs
1 //------------------------------------------------------------------------------
2 // <copyright file="WebSocketCloseStatus.cs" company="Microsoft">
3 //     Copyright (c) Microsoft Corporation.  All rights reserved.
4 // </copyright>
5 //------------------------------------------------------------------------------
6 namespace System.Net.WebSockets
7 {
8     using System.Diagnostics.CodeAnalysis;
9
10     [SuppressMessage("Microsoft.Design", 
11         "CA1008:EnumsShouldHaveZeroValue", 
12         Justification = "This enum is reflecting the IETF's WebSocket specification. " +
13                         "'0' is a disallowed value for the close status code")]
14     public enum WebSocketCloseStatus
15     {
16         NormalClosure = 1000,
17         EndpointUnavailable = 1001,
18         ProtocolError = 1002,
19         InvalidMessageType = 1003,
20         Empty = 1005,
21         // AbnormalClosure = 1006, // 1006 is reserved and should never be used by user
22         InvalidPayloadData = 1007,
23         PolicyViolation = 1008,
24         MessageTooBig = 1009,
25         MandatoryExtension = 1010,
26         InternalServerError = 1011
27         // TLSHandshakeFailed = 1015, // 1015 is reserved and should never be used by user
28
29         // 0 - 999 Status codes in the range 0-999 are not used.
30         // 1000 - 1999 Status codes in the range 1000-1999 are reserved for definition by this protocol.
31         // 2000 - 2999 Status codes in the range 2000-2999 are reserved for use by extensions.
32         // 3000 - 3999 Status codes in the range 3000-3999 MAY be used by libraries and frameworks. The 
33         //             interpretation of these codes is undefined by this protocol. End applications MUST 
34         //             NOT use status codes in this range.       
35         // 4000 - 4999 Status codes in the range 4000-4999 MAY be used by application code. The interpretaion
36         //             of these codes is undefined by this protocol.
37     }
38 }