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

203
Views
Node.js net.Socket().connect() se bloquea y no se conecta al servidor

Tengo un servidor y un cliente configurados con el módulo de net para Node.js.

Aquí está el código de mi servidor:

 const server = net.createServer(function(socket) { socket.on("data", function(data) { // Do stuff with the connection socket.end(); }); }); server.listen(this.port);

Aquí está el código de mi cliente:

 const client = new net.Socket(); client.connect(this.port, this.host, function() { client.write("Test Message"); });

Cuando se ejecutan en la misma máquina, ambos funcionan bien, pero cuando trato de conectarme desde una computadora diferente, el cliente se cuelga en client.connect() para siempre (hasta que termino el proceso). Cuando traté de usar el comando telnet en el símbolo del sistema, no obtuve una respuesta del servidor, pero el cliente no solo dice que se rechazó la conexión. ¿Que está pasando aqui?

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!