Socket.io-client cannot be used to connect with namespace in a vue project

socket.io-client cannot be used to connect with namespace in a vue project

const socket=io("http://127.0.0.1:9092/marketValue",{transports:["websocket","xhr-polling","jsonp-polling"]})
socket.on("connect",function(){
    console.log(socket.id)
})
socket.on("marketValue", function (data) {
    console.log(data)
});

through the F12 console, you can see the connection information as follows

clipboard.png
in the tag section of the figure, I don"t know why there is a comma after marketValue
has anyone ever used socket.io-client in a vue project? And use the namespace, please know the Daniel gang answer, thank you.


https://github.com/mrniko/net.
an bug parsed by namespace

Menu