joewalnes / reconnecting-websocket

A small decorator for the JavaScript WebSocket API that automatically reconnects
MIT License
4.21k stars 968 forks source link

Suggestion to Improvement for support method ws.binaryType = "arraybuffer" #48

Open henriquem opened 9 years ago

henriquem commented 9 years ago

Hi, I'm using ReconnectionWebSocket (very good function!)

But I encourage in provide support to: "ws.binaryType = "arraybuffer" ; It will be used when receive Blog images;

For example bellow way works very well :+1:

var ws=new WebSocket("ws://......")
ws.binaryType = "arraybuffer";

It not works :-1:

 var ws=new ReconnectingWebSocket("ws://......",null,  {binaryType:"arraybuffer",debug: false,reconnectInterval: 4000});
 ws.binaryType = "arraybuffer";