|
|
|
|
@ -80,12 +80,12 @@ namespace WebSocketSharp
|
|
|
|
|
private bool _enableRedirection;
|
|
|
|
|
private AutoResetEvent _exitReceiving;
|
|
|
|
|
private string _extensions;
|
|
|
|
|
private bool _fcompressed;
|
|
|
|
|
private Opcode _fopcode;
|
|
|
|
|
private object _forConn;
|
|
|
|
|
private object _forMessageEventQueue;
|
|
|
|
|
private object _forSend;
|
|
|
|
|
private MemoryStream _fragmentsBuffer;
|
|
|
|
|
private bool _fragmentsCompressed;
|
|
|
|
|
private Opcode _fragmentsOpcode;
|
|
|
|
|
private const string _guid = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11";
|
|
|
|
|
private Func<WebSocketContext, string> _handshakeRequestChecker;
|
|
|
|
|
private bool _ignoreExtensions;
|
|
|
|
|
@ -1116,8 +1116,8 @@ namespace WebSocketSharp
|
|
|
|
|
if (frame.IsContinuation)
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
|
|
_fopcode = frame.Opcode;
|
|
|
|
|
_fcompressed = frame.IsCompressed;
|
|
|
|
|
_fragmentsOpcode = frame.Opcode;
|
|
|
|
|
_fragmentsCompressed = frame.IsCompressed;
|
|
|
|
|
_fragmentsBuffer = new MemoryStream ();
|
|
|
|
|
_inContinuation = true;
|
|
|
|
|
}
|
|
|
|
|
@ -1125,11 +1125,11 @@ namespace WebSocketSharp
|
|
|
|
|
_fragmentsBuffer.WriteBytes (frame.PayloadData.ApplicationData, 1024);
|
|
|
|
|
if (frame.IsFinal) {
|
|
|
|
|
using (_fragmentsBuffer) {
|
|
|
|
|
var data = _fcompressed
|
|
|
|
|
var data = _fragmentsCompressed
|
|
|
|
|
? _fragmentsBuffer.DecompressToArray (_compression)
|
|
|
|
|
: _fragmentsBuffer.ToArray ();
|
|
|
|
|
|
|
|
|
|
enqueueToMessageEventQueue (new MessageEventArgs (_fopcode, data));
|
|
|
|
|
enqueueToMessageEventQueue (new MessageEventArgs (_fragmentsOpcode, data));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_fragmentsBuffer = null;
|
|
|
|
|
|