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

485
Views
Error de recepción: xhr poll error socket.io client React

Recibo un Error: xhr poll error en el evento connect_error cuando intento conectarme a mi puerta de enlace websocket. Estoy usando "socket.io-client": "^4.2.0" .

 import { io } from "socket.io-client"; const ENDPOINT = "http://localhost:3001"; const socket = io(ENDPOINT); socket.on("connect_error", (e: any) => { console.log(e); });
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Puede intentar configurar la conexión del cliente para usar solo el transporte websocket. Por defecto usa weboscket y polling.

 { transports: ['websocket'] }

Entonces su código se convertirá en:

 const socket = io(ENDPOINT, { transports: ['websocket'] });
about 4 years ago · Juan Pablo Isaza Report
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!