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.
35
questions
0
votes
0
answers
151
views
Queue system for a 1v1 multiplayer game in node.js with socket.io
I'm trying to create a simple node app utilizing socket.io rooms where users can play a 1v1 game against other users. The system I have in place at the moment is when a user clicks the play button ...
4
votes
1
answer
851
views
9X9 Tic Tac Toe variant with frontend in react and backend in python flask_socketio
I (a junior back-end Java dev) decided I wanted to learn some front-end development skills; in particular, I wanted experience with React and websockets. I decided to write an app that would allow for ...
2
votes
0
answers
308
views
socket.io / jwt [closed]
I am studying socket.io and ended up making a connection using react as front end
js and how to back end node js
I was successful but I have a question as to how I made my code I don't know if it's "...
4
votes
2
answers
279
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
1
answer
204
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
0
answers
230
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
1
answer
420
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
1
answer
151
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
0
answers
272
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 ...
5
votes
1
answer
611
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 ...
2
votes
2
answers
5k
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 ...
13
votes
1
answer
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 ...
13
votes
1
answer
3k
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
0
answers
25
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
0
answers
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
0
answers
1k
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
0
answers
967
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
0
answers
751
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
0
answers
462
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
1
answer
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
1
answer
91
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
0
answers
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 ...
5
votes
1
answer
920
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
1
answer
265
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
1
answer
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
1
answer
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
1
answer
764
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
1
answer
887
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
1
answer
2k
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
1
answer
232
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
1
answer
511
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
1
answer
284
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
1
answer
650
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
1
answer
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
1
answer
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 ...