Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

170
Views
Can't connect to WebSocket using Socket.io | WS

I'm trying to connect to wss://csgoexo.com/socket.io/ using socket.io-client@2.4.0. I really don't understand what I'm doing wrong. Could you help me, I can pay for it, I'm seriously tired of this. I also used "ws" library - all the same. Code:

const Io = require("socket.io-client"); //2.4.0

async function wsConnect(){
  const socket = Io('wss://csgoexo.com/socket.io/', {
    transports: ["websocket"],
    extraHeaders: {
      "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.54 Safari/537.36",
      "Origin": "https://csgoexo.com"
    }
  });

  socket.on('connect', () => {
    console.log('Connected!', {id: socket.id});
  });
  // socket.on('close', (reason) => {
  //   console.log(reason)
  // })
  socket.on("disconnect", (reason) => {
    console.log('Disconnected', reason)
    if (reason === "io server disconnect") {
      // the disconnection was initiated by the server, you need to reconnect manually
      socket.connect();
    }
    // else the socket will automatically try to reconnect
  });
  socket.on("connect_error", (error) => {
    console.log(error)
  });
}

wsConnect();

https://www.piesocket.com/ - it works with this service. Error: 403. 'Unexpected server response: 403', CloseCode: 1006

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!