mirror of
https://github.com/uNetworking/uWebSockets.js.git
synced 2026-03-31 18:00:12 -04:00
Accept SharedArrayBuffers as input
This commit is contained in:
@@ -111,6 +111,11 @@ public:
|
||||
ArrayBuffer::Contents contents = arrayBuffer->GetContents();
|
||||
length = contents.ByteLength();
|
||||
data = (char *) contents.Data();
|
||||
} else if (value->IsSharedArrayBuffer()) {
|
||||
Local<SharedArrayBuffer> arrayBuffer = Local<SharedArrayBuffer>::Cast(value);
|
||||
SharedArrayBuffer::Contents contents = arrayBuffer->GetContents();
|
||||
length = contents.ByteLength();
|
||||
data = (char *) contents.Data();
|
||||
} else {
|
||||
invalid = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user