I've been struggling to run the code from this post and I really need some help. The code can be found at: https://medium.com/@mogold/nodejs-socket-io-express-multiple-modules-13f9f7daed4c. I liked the code as it seems suitable for large projects, but I'm ...
I've been working on integrating sockets into my app, but have run into an error https://i.stack.imgur.com/4lUF7.png Interestingly, when I tested the socket functionality in a separate test app using the same code, everything worked perfectly. However, wi ...
How can I send JSON data using sockets in Python? {"receiver": "2", "sender:": 1, "seq_num": 10, "data": "{"iv": "jdjhvwGriJ95kZwgDWlShw==", "ciphertext": "Fg7ugYYAn ...
It appears that npm and nodejs are experiencing issues on the latest Windows version build 1433 When I ran the following command: npm -v events.js:141 throw er; // Unhandled 'error' event ^ Error: This socket is closed. ...
Currently, I am utilizing express 4.13 and socket.io 1.3.2 along with an express generator. Here is the code snippet from my app.js: var app = express(); var server=require('http').createServer(app).listen(app.get('port'),'127.0. ...
My web application caters to two types of users: public users who have yet to authenticate, and private users who are logged in and have authenticated themselves. Using token-based authentication in a single-page app, there are no page refreshes after the ...
Whenever I encounter the need to divide data, my standard practice involves converting it into a string format. Here's an example of how I handle data in my function: socket.on('data', function (data) { var str = data.toString().spl ...
My task involves retrieving information from the server on the client side. When a client first connects to the server, this is what happens: socket.on('adduser', function(username){ // miscellaneous code to set num_player and other variabl ...
I have implemented socket functionality on my website where users can send a word to the server, triggering an event (art-addpic) that broadcasts an image URL corresponding to that word to all users. However, only users with isArtist=true are allowed to re ...
Upon executing the command in my Unix Vagrant box, sudo npm install -g socket.io, I receive the following response after a few seconds: > <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="e39490a3d3cdd7cdd0d2">[email p ...
Imagine this scenario: I have a server where socket(1) runs, and another server where socket(2) client connects to socket(1). Additionally, I have one browser socket that connects to socket(1). The goal is to send requests from the browser and retrieve d ...
I've been encountering an issue with message transmission from client to server while using React and ExpressJS. When I trigger the sendMessage function on the client side, my intention is to send a message to the server. However, for some reason, the serv ...
Have you ever encountered the frustrating "the connection was reset" message while attempting to surf the web? (This specific text is from Firefox, other browsers may vary.) Occasionally, I find myself needing to intentionally trigger this error message i ...
Currently, I am working on a straightforward script that sends messages from a client to a server. Everything works smoothly when the client and server are on the same computer. However, an issue arises when attempting to send a message from a different la ...
Looking for assistance with creating a PHP adapter for the binary API of OrientDB, specifically regarding socket communications. Struggling to establish a connection between PHP and OrientDB, seeking help from someone familiar with raw socket communicatio ...
I have reviewed various solutions but none of them seem to address my issue. I am currently working on developing an online multiplayer chess game. Let's say I have a roster of participants and 10 users are actively listed. My goal is for the admin ...
Currently, I am receiving data from the backend through a socket connection. The data (item) is then pushed to an array. However, if a certain variable is set to true (indicating that it's paused), I do not want to push the item to the array. cons ...
I've been struggling to pass session data from socket.io to express routes using express-socket.io-session. Despite saving the data on the socket's "connection" event, my express routes are not able to access the updated session variables. I have ...
Currently, I am utilizing the most recent version of socket.io (1.0.6) to develop an online multiplayer game using Phaser and Node. One issue that has arisen is that after the clients connect, they will sporadically disconnect without any specific pattern. ...
I am currently developing a chat application and I have encountered an issue. When the static file routing is functioning correctly, the socket.io for the chat feature throws a "not found" error in the console. http://localhost/socket.io/?EIO=3&tran ...
I want to display notifications for new users who have registered on my website, so that existing logged-in users can see messages like "blabla has registered...". To achieve this, I first created an Event class along with a channel setup: class UserSign ...
Every time I start my server, the web socket sends me 1 initial response with information about Bitcoin. However, I am facing an issue where I either do not receive updates when the price changes or suddenly receive a large number of updates all at once. I ...
I am currently facing some challenges with authenticating users in socket.io for my chat application. I am storing all users in an array using the following structure: let sockets = []; sockets[userdbId] = socket.id However, there are a few issues that I ...
My current setup in terms of web service operation is as follows: We have multiple clients sending requests to a web server, which then passes those messages on to a C program via a UNIX domain socket. Historically, I've relied on Apache and PHP to handl ...
I am currently working on a project that involves tracking all socket.io notification transactions initiated by the server, resembling an API request/response counter to validate subscription validation. Our team is utilizing an express middleware to moni ...
Is there a way to send messages from the client to the server using Laravel Echo and then save those messages in a database? I did some research and found out that the whisper method can be used to send messages to the Redis server. window.Echo.join('room' ...
I have integrated session.socket.io into my application. o = require('socket.io').listen(tmpServer), appCookieParser = express.cookieParser(settings.cookie.secret), appRedisStore = new RedisStore(), sessionIO = new SessionSockets(io, appRedisSto ...
I'm currently involved in testing and I require the ability to set the initial sequence number (ISN) of a TCP connection to a specific value. The ISN is typically a random value chosen by the OS/Network Stack, but I need to have control over it. Is there ...
I am in the process of integrating socket.io into my core PHP custom framework. I prefer not to use node.js because it may cause conflicts with my existing AJAX code. 1) Is there a way to use socket.io without relying on node.js? 2) If node.js is necessar ...
I have implemented a json socket server/client using the jsocket python library. The issue I am facing is that my server crashes after the first time the connection is closed. How can I ensure the server stays running? Below is the code for the server: i ...
While I can successfully establish a TCP connection between a TCP client and TCP server on localhost, I am facing difficulties when trying to replicate the same setup for connections involving different computers within the same network range. Specifically ...
While utilizing Apache on Ubuntu 15.04, I am attempting to eliminate port 3000 from the URL and modify the path to http://example.com/{app}/socket.io... By employing ProxyPass and ProxyPassReverse, I have successfully removed the port from the URL and adj ...
I'm attempting to find a method to unsubscribe from a Redis channel when the user navigates to another page within our website. I have attempted to detect a disconnect socket event when the user clicks on a link, but unfortunately, the event is never trigg ...
I'm currently working on a Node.js - Unity game that utilizes sockets for user connection to the game. I've encountered an issue where the connection seems to be constantly reconnecting and disconnecting in a loop within Unity. However, when I te ...
I am currently using React on the frontend and Express on the backend. The code snippet below is what I have written to establish a connection between the client and the server: import React, { useEffect, useState } from 'react'; import { io } from "socke ...
Currently, I have a live bidding system in place. On the bidding page, we display both the base price and current bid price of an item. Whenever a user updates the price of an item, I would like that new price to automatically reflect for all customers who ...
I am currently learning Node.js and I am encountering an issue with using socket.id to identify logged in users on the client side using their email id and password. The verification process happens on the server side, and if successful, the user's so ...
After struggling with this issue for some time, I have decided to seek help from experts. Language: python The problem/setup: I am managing multiple clients, client[n], client[n] .. etc I also have several servers, server[n], server[n] .. etc Each se ...
I am currently attempting to run a Node.js application on my server using SSH. When I run 'node server.js' in the terminal, everything seems to be running correctly: var express = require('express'); var app = express(); var server = app.listen(5431); app ...
I am currently learning about HTTP/CGI and exploring how to display HTML content on a webpage through the use of the socket library in Python. However, I am encountering some confusion regarding the correct syntax for this task: #!/usr/bin/env python impo ...
Encountering an issue while setting up an express server with Sockets (using the socketcluster-server module). After sending around 20 http requests, the express server gets blocked, leading to the Sockets (client) reporting a connection depletion. Has an ...
Hello, I am facing an issue with my io.connect("mydomain:3000") call in my Laravel view file. When testing on localhost where "mydomain" is replaced with "http://localhost", I see an error in the browser console saying "Failed to load resource: the server ...
Looking at this block of PHP code: $fp = stream_socket_client('ssl://gateway.sandbox.push.apple.com:2195', $err, $errstr, 60, STREAM_CLIENT_CONNECT, $ctx); The number '60' in the code represents a timeout for the connection establishm ...
I am currently utilizing socket.io for internal communication within my node.js application. While the code functions properly on my development machine, a continuous stream of messages appears during app startup on the main server: GET /socket.io/?EIO=3& ...
I am looking to create a cloud computing project using PHP. The main goal of this project is for users to store their files on a cloud server and if any unauthorized manipulations occur, the system should be able to detect and correct them. My question is ...
I am currently working on a project to develop a simple application that can live stream video using Python 3 and OpenCV over a socket. I have limited experience with both OpenCV and socket programming, so any detailed answers would be greatly appreciated. ...
How can I retrieve the length of a socket io message (in a variable)? I attempted to use this code below, but unfortunately, it did not yield the desired result. socket.on('message', function (message) { var messagelength = message.length; / ...
Recently, I've been exploring Android and I have a task at hand to establish a TCP socket connection and listen on a specific port. The client application will be sending me 2 images along with a related string. Instead of transmitting each piece of d ...
div(ng-controller="dashController") nav.navbar.navbar-expand-sm.navbar-dark.fixed-top .container img(src='../images/Dashboard.png', alt='logo', width='180px') ul.navbar-nav li.nav-item a.nav-link.active(href= ...
Whenever a client connects to my node.js server, it crashes with a 'RangeError: Maximum call stack size exceeded' error. I suspect there's a recursive problem somewhere in my code that I can't seem to find. This is the code on my server: require('monitor ...
Currently, I am working on integrating an evaluation feature into a Node.JS REPL. However, when trying to execute it, I encountered the following error: TypeError: Property 'eval' of object #<REPLServer> is not a function. Below is the exce ...
I am currently developing an array in my socket io server and then transmitting it to the client. var roomList = io.sockets.manager.rooms; // creating a new Array to store the clients per room var clientsPerRoom = new Array(); //for (var i ...
Looking to add chat functionality to my app as a feature request. The backend is built in nodejs, so I'm exploring different ways to achieve this. Tried using socket.io but ran into compatibility issues between socket.io and flutter. My preference is not ...
My WebSocket server implementation is quite simple: const WebSocket = require('ws'); const wss = new WebSocket.Server( { server: server, path: "/ws" }); wss.on('connection', function connection(ws, req) { console.log("Connected"); ws.on('mes ...
Utilizing the "net" library, I am creating TCP connections on my Node.js server. root.socket = net.createConnection(root.config.port, root.config.server); I am currently working on handling errors that occur when the remote server goes down and implement ...
Hello, I am currently developing my rest api app using sails. I came across an interesting article on improving Node.js performance, which you can find here. One of the suggestions in point 2 was to eliminate socket pooling by setting options.agent to fal ...
After reviewing various sources like blogs and videos, it seems that establishing a successful connection between the server and client is achievable. However, I am encountering difficulties implementing this on my own system. Below is the code snippet fo ...
Encountering a strange issue on the remote server side where everything works fine locally with a self-signed cert over https. However, when moving the code to the server, it works locally but not remotely. A node app is created and hosted on the server u ...
I am currently running a REST API on Amazon EC2 using Node.js (Express). During a specific REST call, the client receives a reply of approximately 5MB. However, before the client can fully receive the reply, an error message is displayed: Premature end o ...
I have set up an express.js server-side and followed the socket.io guide. However, I am facing issues with the socket connection not being successful, and there seems to be a high number of unexpected GET requests like this: https://i.stack.imgur.com/GDGg ...
What is the best way to pass the net.socket class as an argument in this scenario? Here's my code snippet: this.server = net.createServer(this.onAccept.bind(this)); this.server.listen(this.port); } Server.prototype.onAccept = function () { // How c ...
While learning Python, I created a small script that seems to run into a stack overflow error when the server disconnects. Here is my script: #/user/bin/python import os import socket import subprocess import errno import threading s = socket.socket() ...
TLDR; Seeking best solution for private instant messenger integration with Laravel. I currently have a live real-time chat feature on my Laravel website, but I am missing the ability for private messaging. The chat is located on the home page and every ti ...
I attempted to set up the hot reload module of jspm using the chokidar-socket-emitter. The installation process went smoothly, but I encountered an issue when trying to start the watch task as outlined in this guide: Below is the log from my installation: ...
Every time I encounter the error message undefined is not an object (evaluating this.props.socket.on). In my code, I define the socket in the index.ios.js file as shown below: class Main extends Component { constructor(props) { super(props); ...
I could really use some clarification on this topic. When it comes to Laravel and socket.io communication, Redis is the key component: https://laravel.com/docs/5.4/broadcasting#configuration My understanding is that Redis functions similarly to memcache ...
Currently, I am incorporating socket.io within a NodeJS application. The socket.io page can be accessed at localhost:8081/socket.io/. However, my goal is to have it located at localhost:8081/hola/socket.io/. Is this achievable? var express = require("e ...
I'm currently working on a collaborative app utilizing node and sockets that includes a simple text tool feature. My goal is for any user who types and applies text to the canvas to have that text visible to all other connected users. Here's wha ...
When the client reconnects after a network drop, the disconnect event is triggered on the server. Client code: var url ='192.168.1.101', port = '80', socket = io.connect('http://' + url + ':' + port, { &apo ...
As I work on setting up a website using the MERN stack, my backend will continuously fetch data from APIs and sockets to save it in a MongoDB database. For the frontend React, I aim to display and update this data in real-time using Socket. I have concern ...
Would it be possible to reference the socket.io client library using a relative path like: src="/socket.io/socket.io.js" instead of the absolute path: src="https://miweb:6969/socket.io/socket.io.js" To establish a connection with the library, typically ...
I have been trying to incorporate a basic Ember application into the view of my node application. I have verified that Ember is properly set up and my sockets are functioning correctly. However, I am encountering an issue where the data is not being displa ...
I am seeking a way to return an array of JSON objects (requested by an AJAX call in an AngularJS web application) that represent specific files on the server implemented with node.js. Typically, the result is quickly accessed from a database. However, if ...
Here's a simple question I have. I am running a Node.js server with the following code snippet: io.on('connection', function (socket) { console.log('connection'); }); On my webpage, I have this line of code: var socket = io(); ...
One challenge I am facing is updating the progress bar while uploading and processing a file using multer in Node.js. Currently, the client only receives updates after the processing is complete, causing the progress bar to jump from 0% to 100% at once ins ...