Skip to content

Commit

Permalink
del message blob support
Browse files Browse the repository at this point in the history
  • Loading branch information
psygames committed Aug 22, 2024
1 parent ce7cf5b commit c537de5
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions Assets/UnityWebSocket/Plugins/WebGL/WebSocket.jslib
Original file line number Diff line number Diff line change
Expand Up @@ -177,26 +177,6 @@ var WebSocketLibrary =
_free(buffer);
}
}
else if (ev.data instanceof Blob)
{
var reader = new FileReader();
reader.onload = function()
{
var array = new Uint8Array(reader.result);
var buffer = _malloc(array.length);
writeArrayToMemory(array, buffer);
try
{
Module.dynCall_viii(webSocketManager.onMessage, instanceId, buffer, array.length);
}
finally
{
reader = null;
_free(buffer);
}
};
reader.readAsArrayBuffer(ev.data);
}
else if(typeof ev.data == 'string')
{
var length = lengthBytesUTF8(ev.data) + 1;
Expand Down

0 comments on commit c537de5

Please sign in to comment.