mirror of https://github.com/adamdruppe/arsd.git
Merge branch 'master' into cgi_preview
This commit is contained in:
commit
46ae18e112
6
http2.d
6
http2.d
|
@ -2813,6 +2813,7 @@ class WebSocket {
|
||||||
|
|
||||||
private WebSocketFrame processOnce() {
|
private WebSocketFrame processOnce() {
|
||||||
ubyte[] d = receiveBuffer[0 .. receiveBufferUsedLength];
|
ubyte[] d = receiveBuffer[0 .. receiveBufferUsedLength];
|
||||||
|
//import std.stdio; writeln(d);
|
||||||
auto s = d;
|
auto s = d;
|
||||||
// FIXME: handle continuation frames more efficiently. it should really just reuse the receive buffer.
|
// FIXME: handle continuation frames more efficiently. it should really just reuse the receive buffer.
|
||||||
WebSocketFrame m;
|
WebSocketFrame m;
|
||||||
|
@ -2876,7 +2877,10 @@ class WebSocket {
|
||||||
default: // ignore though i could and perhaps should throw too
|
default: // ignore though i could and perhaps should throw too
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
receiveBufferUsedLength -= s.length - d.length;
|
|
||||||
|
import core.stdc.string;
|
||||||
|
memmove(receiveBuffer.ptr, d.ptr, d.length);
|
||||||
|
receiveBufferUsedLength = d.length;
|
||||||
|
|
||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue