|
|
|
|
@ -518,7 +518,8 @@ Extended Payload Length: {7}
|
|
|
|
|
Stream stream,
|
|
|
|
|
WebSocketFrame frame,
|
|
|
|
|
Action<WebSocketFrame> completed,
|
|
|
|
|
Action<Exception> error)
|
|
|
|
|
Action<Exception> error
|
|
|
|
|
)
|
|
|
|
|
{
|
|
|
|
|
var len = frame.ExtendedPayloadLengthCount;
|
|
|
|
|
if (len == 0) {
|
|
|
|
|
@ -531,14 +532,16 @@ Extended Payload Length: {7}
|
|
|
|
|
stream.ReadBytesAsync (
|
|
|
|
|
len,
|
|
|
|
|
bytes => {
|
|
|
|
|
if (bytes.Length != len)
|
|
|
|
|
throw new WebSocketException (
|
|
|
|
|
"The extended payload length of a frame cannot be read from the stream.");
|
|
|
|
|
if (bytes.Length != len) {
|
|
|
|
|
var msg = "The extended payload length of a frame could not be read.";
|
|
|
|
|
throw new WebSocketException (msg);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
frame._extPayloadLength = bytes;
|
|
|
|
|
completed (frame);
|
|
|
|
|
},
|
|
|
|
|
error);
|
|
|
|
|
error
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private static WebSocketFrame readHeader (Stream stream)
|
|
|
|
|
|