Modified CloseStatusCode enum values to PascalCase values
This commit is contained in:
@@ -410,7 +410,7 @@ namespace WebSocketSharp.Server
|
||||
}
|
||||
|
||||
_services.Stop (
|
||||
((ushort) CloseStatusCode.SERVER_ERROR).ToByteArrayInternally (ByteOrder.Big), true);
|
||||
((ushort) CloseStatusCode.ServerError).ToByteArrayInternally (ByteOrder.Big), true);
|
||||
|
||||
_listener.Abort ();
|
||||
_state = ServerState.Stop;
|
||||
|
@@ -466,7 +466,7 @@ namespace WebSocketSharp.Server
|
||||
|
||||
_listener.Stop ();
|
||||
_services.Stop (
|
||||
((ushort) CloseStatusCode.SERVER_ERROR).ToByteArrayInternally (ByteOrder.Big), true);
|
||||
((ushort) CloseStatusCode.ServerError).ToByteArrayInternally (ByteOrder.Big), true);
|
||||
|
||||
_state = ServerState.Stop;
|
||||
}
|
||||
|
@@ -215,7 +215,7 @@ namespace WebSocketSharp.Server
|
||||
{
|
||||
ID = _sessions.Add (this);
|
||||
if (ID == null) {
|
||||
_websocket.Close (CloseStatusCode.AWAY);
|
||||
_websocket.Close (CloseStatusCode.Away);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -295,7 +295,7 @@ namespace WebSocketSharp.Server
|
||||
|
||||
if (host.Sessions.State == ServerState.Start)
|
||||
host.Sessions.Stop (
|
||||
((ushort) CloseStatusCode.AWAY).ToByteArrayInternally (ByteOrder.Big), true);
|
||||
((ushort) CloseStatusCode.Away).ToByteArrayInternally (ByteOrder.Big), true);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@@ -812,7 +812,7 @@ namespace WebSocketSharp.Server
|
||||
if (_sessions.TryGetValue (id, out session)) {
|
||||
var state = session.State;
|
||||
if (state == WebSocketState.OPEN)
|
||||
session.Context.WebSocket.Close (CloseStatusCode.ABNORMAL);
|
||||
session.Context.WebSocket.Close (CloseStatusCode.Abnormal);
|
||||
else if (state == WebSocketState.CLOSING)
|
||||
continue;
|
||||
else
|
||||
|
Reference in New Issue
Block a user