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

222
Views
React Native: ¿Cómo integrar Socket.io con Sails.js?

Tengo lo siguiente, una conexión simple de servidor y cliente con Express usando NodeJS:

 var express = require('express'); var http = require('http') var socketio = require('socket.io'); var app = express(); var server = http.Server(app); var websocket = socketio(server); server.listen(3000, () => console.log('Listening to: 3000')); // The event will be called when a client is connected. websocket.on('connection', (socket) => { console.log('Client just joined with ', socket.id); });

y:

 import React from 'react'; import SocketIOClient from 'socket.io-client'; class Main extends React.Component { constructor(props) { super(props); // Creating the socket-client instance will automatically connect to the server. this.socket = SocketIOClient('http://localhost:3000'); } } module.exports = Main;

Simplemente querría una sala de chat entre dos personas y una lista de esas salas de chat con mensajes persistentes. Pero he integrado el proyecto con Sails.js y me preguntaba cómo debería manejarlo con Socket.io .

Gracias de antemano y me aseguraré de votar a favor/aceptar la respuesta.

about 4 years ago · Santiago Trujillo
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!