How to use socket.io-client

Comprehensive socket.io-client code examples:

How to use socket.io-client.io:

458
459
460
461
462
463
464
465
466
467
  } else {
    await this.query(req, cb)
  }
}
connect(req, cb) {
  const socket = io(req.url)
  socket.emit('request', req)
  socket.on('response', cb)
  socket.on('error', function(e) {
    throw e

How to use socket.io-client.connect:

11
12
13
14
15
16
17
18
19
20

io : null,

init:function(){
    
    this.io = socket.connect(Config.socketUrl);
    

    this.io.on('socketerror', function(param){