Modified WsFrame.cs

This commit is contained in:
sta 2013-10-21 00:17:51 +09:00
parent 0e54f96aea
commit a7d5c1640b

View File

@ -421,7 +421,7 @@ namespace WebSocketSharp
return CreateCloseFrame ( return CreateCloseFrame (
Mask.UNMASK, Mask.UNMASK,
CloseStatusCode.ABNORMAL, CloseStatusCode.ABNORMAL,
"'Extended Payload Length' of a frame cannot be read from the data stream."); "The 'Extended Payload Length' part of a frame cannot be read from the data source.");
frame.ExtPayloadLen = extPayloadLen; frame.ExtPayloadLen = extPayloadLen;
@ -436,7 +436,7 @@ namespace WebSocketSharp
return CreateCloseFrame ( return CreateCloseFrame (
Mask.UNMASK, Mask.UNMASK,
CloseStatusCode.ABNORMAL, CloseStatusCode.ABNORMAL,
"'Masking Key' of a frame cannot be read from the data stream."); "The 'Masking Key' part of a frame cannot be read from the data source.");
frame.MaskingKey = maskingKey; frame.MaskingKey = maskingKey;
@ -465,7 +465,7 @@ namespace WebSocketSharp
return CreateCloseFrame ( return CreateCloseFrame (
Mask.UNMASK, Mask.UNMASK,
CloseStatusCode.ABNORMAL, CloseStatusCode.ABNORMAL,
"'Payload Data' of a frame cannot be read from the data stream."); "The 'Payload Data' part of a frame cannot be read from the data source.");
} }
else else
{ {
@ -609,7 +609,7 @@ namespace WebSocketSharp
: CreateCloseFrame ( : CreateCloseFrame (
Mask.UNMASK, Mask.UNMASK,
CloseStatusCode.ABNORMAL, CloseStatusCode.ABNORMAL,
"The header part of a frame cannot be read from the 'stream'."); "The header part of a frame cannot be read from the data source.");
} }
catch (Exception ex) { catch (Exception ex) {
if (error != null) if (error != null)
@ -641,16 +641,12 @@ namespace WebSocketSharp
: CreateCloseFrame ( : CreateCloseFrame (
Mask.UNMASK, Mask.UNMASK,
CloseStatusCode.ABNORMAL, CloseStatusCode.ABNORMAL,
"The header part of a frame cannot be read from the 'stream'."); "The header part of a frame cannot be read from the data source.");
if (completed != null) if (completed != null)
completed (frame); completed (frame);
}, },
ex => error);
{
if (error != null)
error (ex);
});
} }
public void Print (bool dumped) public void Print (bool dumped)