Define transport types on the client side

前端 未结 2 697
自闭症患者
自闭症患者 2020-12-29 11:56

I need to use jsonp-polling for IE, and xhr-polling for Firefox, so I tried to define types of transports on the client side like this:

    if (/Firefox[\\         


        
2条回答
  •  天涯浪人
    2020-12-29 12:48

    there is a bug in socket.io.client.

    so you can not set transports in client...

    function Socket (options) {
    this.options = {
        port: 80
      , secure: false
    ....
    };
    
    io.util.merge(this.options, options);
    ....
    };
    

    should be io.util.merge(this.options, options,0);....

提交回复
热议问题