57 lines
2.6 KiB
C#
57 lines
2.6 KiB
C#
// Copyright (c) Microsoft Open Technologies, Inc.
|
|
// All Rights Reserved
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR
|
|
// CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING
|
|
// WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
|
|
// TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR
|
|
// NON-INFRINGEMENT.
|
|
// See the Apache 2 License for the specific language governing
|
|
// permissions and limitations under the License.
|
|
|
|
//------------------------------------------------------------------------------
|
|
// <copyright file="WebSocketCloseStatus.cs" company="Microsoft">
|
|
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
// </copyright>
|
|
//------------------------------------------------------------------------------
|
|
|
|
using System;
|
|
using System.Diagnostics.CodeAnalysis;
|
|
|
|
namespace Microsoft.AspNet.WebSockets
|
|
{
|
|
[SuppressMessage("Microsoft.Design",
|
|
"CA1008:EnumsShouldHaveZeroValue",
|
|
Justification = "This enum is reflecting the IETF's WebSocket specification. " +
|
|
"'0' is a disallowed value for the close status code")]
|
|
public enum WebSocketCloseStatus
|
|
{
|
|
NormalClosure = 1000,
|
|
EndpointUnavailable = 1001,
|
|
ProtocolError = 1002,
|
|
InvalidMessageType = 1003,
|
|
Empty = 1005,
|
|
// AbnormalClosure = 1006, // 1006 is reserved and should never be used by user
|
|
InvalidPayloadData = 1007,
|
|
PolicyViolation = 1008,
|
|
MessageTooBig = 1009,
|
|
MandatoryExtension = 1010,
|
|
InternalServerError = 1011
|
|
// TLSHandshakeFailed = 1015, // 1015 is reserved and should never be used by user
|
|
|
|
// 0 - 999 Status codes in the range 0-999 are not used.
|
|
// 1000 - 1999 Status codes in the range 1000-1999 are reserved for definition by this protocol.
|
|
// 2000 - 2999 Status codes in the range 2000-2999 are reserved for use by extensions.
|
|
// 3000 - 3999 Status codes in the range 3000-3999 MAY be used by libraries and frameworks. The
|
|
// interpretation of these codes is undefined by this protocol. End applications MUST
|
|
// NOT use status codes in this range.
|
|
// 4000 - 4999 Status codes in the range 4000-4999 MAY be used by application code. The interpretaion
|
|
// of these codes is undefined by this protocol.
|
|
}
|
|
} |