The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [socket.io]

Socket.IO is a JavaScript library for realtime web applications. It enables realtime, bi-directional communication between web clients and servers.

Filter by
Sorted by
Tagged with
4
votes
2answers
73 views

An Express route, which renders a page, and makes use of socket.io

This is the code for a basic endpoint in my express app routes folder. This firstly renders a page, and then on a continuous loop, renders information about some random "Breaking Bad" character. The ...
5
votes
1answer
153 views

Node websockets

I have this code I use it for two things connect to lxd instances and emits any operation events it recieves over socket.io to the client Bridge between client and lxd for terminals Its pretty ...
1
vote
0answers
46 views

Filtering users in socket.io and seeing who is online

While implementing socket.io on my server, I ran into some problems and eventually fixed them. The code below is fired on the connection event of socket.io: ...
2
votes
1answer
66 views

Await socket Response

I wrote this to make the "callback hell" more manageable on the part of the coder when using Socket IO, so that there wasn't really any callback hell to go with, just a simple await. This should work ...
3
votes
1answer
84 views

Mini Tor implementation (“CLI only anonymous network”)

The goal of my project is to build a mini "anonymous" network (like Tor is) (command-line only) using Node.js and frameworks (socket.io / axios / express). A ...
1
vote
0answers
175 views

Socket.IO chat app with extra features

I added more features to a Socket.IO tutorial and wanted to know how I can improve my code. I have some questions about how it's built at the moment, especially when a client or the server should ...
1
vote
0answers
21 views

Link/Bookmark app Javascript Backend

This is the backend "API" in Socket.io for my links/bookmarks app. Error handling in this and verifying a path to the link seems pretty verbose. I want to improve this. ...
5
votes
1answer
484 views

NodeJS/Express/socket.io backend

I have the backend of a socket.io script running in NodeJS for a web application. A user can login to the site and join a project collaboration (group of users linked to a project). Each project has a ...
1
vote
0answers
41 views

How to ensure there is one Executor

I am using Socket.IO-java on the desktop application to handle realtime communication with the server. I was wondering if I could get some feed back on the setup as I am not happy with how it's done, ...
2
votes
2answers
3k views

Socket.io Node.js Object Oriented Code Structure Approach

following application: Users can join Rooms. A Gameroom inherits from Room and has a queue where Users can queue for a game. If enough people queue they get thrown into a game lobby. Lobby also ...
12
votes
1answer
2k views

Basic chat server and client using WebSocket

Based on Node.js in Action (Manning Publications) chapter 2 "Building a Multi-room Chat Application", I've taken the model they presented (which is all typical ES5 and jQuery) and completely rewrote ...
11
votes
1answer
2k views

Real time Tic Tac Toe game in Javascript using Socket.IO

This is my first attempt at building a full project. I've recently learned using prototypical inheritance in JS. Please tell me how I can improve the quality of this code. The game is available here:...
2
votes
0answers
24 views

Tracking stopped players and connecting them so they can interact

This file handles the player "stopping" in space, trying to find whoever is ahead or behind (also stopped) and joining everyone into each others stopping -rooms. I'm not too sure about the whole "each ...
2
votes
0answers
2k views

Passing sessions from express+passport to socket.io

I'm a node beginner and I'm trying to write fewer lines of code by finding out which lines are redundant. ...
2
votes
0answers
637 views

Online Snake v0.1 with Python-flask and socketio

What I am essentially doing is writing a snake game that everybody could play on the internet, broadcast their game if they like and so on. Now it looks like this, just websocket-based snake, no user ...
2
votes
0answers
684 views

Using Flask-SocketIO in conjunction with Flask-WTF / WTForms to provide realtime form validation feedback

I am working on a user login using Flask and the following extensions: Flask-Login, Flask-WTF, ...
2
votes
0answers
479 views

socket.io and garbage collection

I have developed a realtime text web app using socket.io that continuously displays text on the web page. When I run my code below with multiple clients connecting the memory usage for the V8 ...
2
votes
0answers
426 views

Chat application built with Node

In an effort to teach myself Node.JS and truly delve into its communication capabilities, I elected to recreate a previous chatting project. It took a bit of forethought to acclimate code to the ...
2
votes
1answer
2k views

Updating HTML table (Userlist) with Node.js

I currently have an HTML <Table> with all the socket.io-rooms. Client-side, the table gets fetched if you visit the page. If some room gets created or deleted,...
7
votes
1answer
78 views

Baking homemade pies has made me so many new connections

Sorry, if you were looking for fresh baked pies, I only have a web client to help you sell them. I've recently picked up server-side JavaScript and have added it to my toolbox, and while I've had a ...
1
vote
0answers
2k views

Node.js/Socket.io chat application

I would like to know how I can improve this chat application of mine. This has been my side-project for a while. I have made it to support on desktops, tablets and smartphones. GitHub link Online ...
1
vote
0answers
284 views

Pulling data quickly from mongodb with node.js

I am currently struggling with a request I am making to my server that is taking more than 4 seconds! I cut out a lot of the cruft to hopefully make it easier to read. Excuse my horrible variable ...
1
vote
0answers
234 views

File-sharing with sockets

I'm trying to get some confidence with RXJS and FRP. This code handles file sharing via socket.io. I need some advice about general RXJS style and reactive programming. ...
5
votes
1answer
840 views

Socket.io wrapper for an app with ReactJS components

I am upgrading a traditional jQuery based app by converting a few parts of it into ReactJs components and use Socket.io for the data transfer medium. There are a few React components spread across ...
3
votes
1answer
248 views

Realtime chat service

I am new to Node.js and Socket.io. I implemented a realtime chat service that has a chatroom feature. When the actual product is launched, there will be at least 200 concurrent users with 50 groups of ...
-3
votes
1answer
2k views

Multiplayer Tic Tac Toe with Socket.io [closed]

I am trying to learn Socket.io and develop a multiplayer tic tac toe game. Right now, I have developed a game that plays well when hosted locally, but I cannot seem to transmit game moves between the ...
6
votes
1answer
3k views

Creating chat commands properly with Socket.IO

I am developing a chat program (mountreus-chat and GitHub) in Node.js using Socket.io and my code looks awful. I'm starting to use commands and now it's even worse. Here's a code snippet (you can ...
4
votes
1answer
720 views

Socket namespace for a chat module

I finally managed to work with socket.io namespace stuff which I'm using for building a chat module. Here, employees of multiple organizations can join and vhat with other employees of the respective ...
4
votes
1answer
610 views

Passing API data chunk per chunk to its socket clients every M seconds

Let's say that I want to query some API which will respond with array of random numbers: [4, ..., 17, ..., 25] To keep things simple enough, let's say that array has always 10 elements. For every ...
2
votes
1answer
1k views

Angular callback scope.apply

Usually the socket.io's on method is like this: socket.on('/msg', function(data){}); But in Angular that callback has to be ...
3
votes
1answer
200 views

Self-balancing robot

I am building a 3D printed self-balancing robot, and use the attached server script to control it. I coded using node.io, express and socket.io. The system is working, but I would appreciate some ...
8
votes
1answer
491 views

Proper prototypal programming with Node.JS

Practicing Prototypal Code I'm focusing on practicing a very prototypal structure with my code (non library oriented) to begin learning to reuse large portions of my application infrastructures where ...
4
votes
1answer
268 views

Socket.IO handshake module

For the server of which this is part, it makes a request to one of our web servers to validate whether the PHP Session ID is actually valid. The location ...
2
votes
1answer
629 views

Node.js chat service

I've built a simple chat server/client on Node.js and socket.io that I would like reviewed. My main concern is making the chat.js (client) running as cleanly as possible (OO) and streamlining data ...
4
votes
1answer
1k views

Node.js chat client

This is a chat using Node.js, socket.io and MongoDB for storage. I'd appreciate any feedback on what can be improved. I understand that this allows for non-unique usernames to be used, and it's ...
3
votes
1answer
1k views

Delivering realtime data from backend socket

I've got server running to make serial data available on a TCP/IP port. My goal is to collect data coming from a realtime device connected to the serial port and deliver it to web clients connected to ...