Modified CloseStatusCode enum values to PascalCase values

This commit is contained in:
sta
2014-03-01 17:32:06 +09:00
parent 69e057969b
commit eb36dd9e82
12 changed files with 73 additions and 79 deletions

View File

@@ -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;

View File

@@ -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;
}

View File

@@ -215,7 +215,7 @@ namespace WebSocketSharp.Server
{
ID = _sessions.Add (this);
if (ID == null) {
_websocket.Close (CloseStatusCode.AWAY);
_websocket.Close (CloseStatusCode.Away);
return;
}

View File

@@ -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;
}

View File

@@ -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