Click here to Skip to main content
15,867,568 members
Everything / Socket.io

Socket.io

socket.io

Great Reads

by honey the codewitch
Explore adapting Socket's async model to a task based one and adding some awaitable socket operations to your projects
by honey the codewitch
A simple home HTTP server that works across all .NET platforms
by Sander Rossel
The eighth in a series on MEAN web development.
by Prince Cheruvathur
Step by step development of a Node.js application in Typescript using Express and MongoDB with real-time update using Socket.io

Latest Articles

by honey the codewitch
Explore adapting Socket's async model to a task based one and adding some awaitable socket operations to your projects
by honey the codewitch
A simple home HTTP server that works across all .NET platforms
by Prince Cheruvathur
Step by step development of a Node.js application in Typescript using Express and MongoDB with real-time update using Socket.io
by Hamdy Sdiri, Ahmed Damak
Installing socket.io on node.js on Windows 8

All Articles

Sort by Score

Socket.io 

23 Jul 2020 by honey the codewitch
Explore adapting Socket's async model to a task based one and adding some awaitable socket operations to your projects
14 Aug 2023 by Sandeep Mewara
It's a well documented sample application for learning WebSocket (using socket.io & react/node.js). References: Video: Realtime Chat App with React, Node.js, Socket.io and MongoDB - YouTube[^] How to Create a Professional Chat API Solution...
30 Apr 2016 by Member 12495050
Hopefully this question is not too broad or too much to ask for...I am building an Android app for my office. The app is used to send message alerts (as a custom "message" object class) to all users with the app (my office only). Once the message is received, all the names of the recipients...
18 May 2016 by Richard MacCutchan
See the explanation of how to use these options at Using SO_REUSEADDR and SO_EXCLUSIVEADDRUSE (Windows)[^].
5 Jan 2021 by Patrice T
Quote: Array keeps returning as string I suspect that you have wrong assumption about how things works. Quote: into a double array msg = [[msg]] but it keeps converting it to I suspect that msg is a string and you embed it in a double array,...
8 Mar 2022 by lukeer
Got it. That __name__ == "__main__" check fails when debugging because Visual Studio Code doesn't start app.py directly but something called launcher instead. VSC also passes launcher some obscure arguments that tell it to start and debug...
17 Jul 2023 by Graeme_Grant
Have you thought about using SignalR[^] instead? It's robust and simple to use, so you can focus on your application. Alternatively, you could use an open source lib like GitHub - nterry/AwesomeSockets: A fast, lightweight, and easy to use...
17 Jul 2023 by Andre Oosthuizen
There is an article on how to keep your connection live here on CodeProject - Set Keep-Alive Values[^] Another discussion found at - TCP keepAlive settings problem[^] My code below based on this link - C# Setting Socket Keep-Alive[^] might be...
16 Aug 2023 by Andre Oosthuizen
a Few changes is needed to make sure your message is sent and viewed - In chat.html - 1) Add a check to see if the user enters a message before sending it. 2) 'Listening' for the 'Enter' key press in the input field to send messages -
26 Sep 2022 by Death Smoke
I'm trying to make a connection between two computers both of them are using tp-link adapter , but i'm not receving anything from client . #include #include using namespace std; int main() { ...
30 Dec 2015 by Member 12237207
Hello. I've been dying to turn my cordova game app into a online multiplayer game, but I can't seem to find any tutorials or anything out there. 3 days I've been slaving on Node.js, but that was what appeared to be a dead end.I can't find any tutorials, or anything. All I want is to follow a...
30 Jan 2016 by Water1988
In java, there is "AsynchronousSocketChannel" class. We can use it to accept a socket which is not blocking. I know there is a method named "Socket.BeginConnect". But I don't know if it is a non-blocking method. Or it is just a blocking method in another thread.
30 Jan 2016 by OriginalGriff
The documentation Socket.BeginConnect Method (EndPoint, AsyncCallback, Object) (System.Net.Sockets)[^] says:When your application calls BeginConnect, the system will use a separate thread to execute the specified callback method, and will block on EndConnect until the Socket connects...
6 Mar 2016 by Member 12373170
Hello, I like to play this game called agar io in which you control the your cell using mouse pointer. I want to ask If I have two windows open of this can i use coordinates of my mouse pointer in the first window to control my cell in another open window ? I know you can use Socket io...
9 Mar 2016 by Member 10305620
I have a problem while closing the client app, when server is closed.I have my read thread and a class which implements tcp connection.Code is below:This is in my main file - main.cppvoid thread_handling(){ /* * Start threading only if server is connected, if not connected Exit...
18 May 2016 by Member 12330615
I am coding a TCP/IP socket program with MFC VC++ that communicate with a server using keep alive socket options. My client PC program have some processes as follows: 1. Making a client socket- Use WSAStartup- create client socket with ip address/ port number ClientSocket =...
26 May 2016 by George Jonsson
It is a bit difficult to give good advice as I don't know exactly what type of device it is and how the clients are using it.You do have a few options, though.1. Handle every possible exception and reconnect if one occurs.I know this is not what you want to do, but it is one...
13 Jun 2016 by Member 12330615
Hi,I use MFC in VC++ in PC.In my TCP/IP socket communication, my client socket is lost when it met a critical abnormal error and program terminated.Next, the client program restart to make a new socket to connect to the same server, there are many reset control messages and looping in...
25 Jul 2016 by Richard MacCutchan
It is all explained in the documentation: getaddrinfo function (Windows)[^].
26 Jul 2016 by User 11060979
Here you can find a complete example (found by google):Winsock Programmer’s FAQ: Get the Local IP Address(es)[^]Read the intro at the top and be Aware that one pc can have several IPs.I hope it helps.
18 Aug 2016 by 09andy
Hi Friends,Currently i am facing problem with socket programming in WCF services for chat application. I have done lot's of R&D on it but not getting successes. So please it is my humble request that if any one have any demo or links related socket programming in WCf services for chat...
18 Aug 2016 by Richard MacCutchan
Google offers lots of samples: socket programming in WCF services for chat application - Google Search[^].
21 Jan 2020 by Shobuj.Akash
Currently I'm building a project where I can send Massage to specific connected clients. But when ever I send data it goes to all of the connected client.I've reviewed this code but still confuse how to implement the solution :( .Server Code While True Dim incoming As TcpClient =...
4 Jan 2017 by Muirik
I am trying to understand what produces the "EXCEPTION: Cannot read property 'url' of undefined" error in a particular instance. I am importing socket.io into the component, and am emitting within my ngOnInit, which is also being correctly imported. I'm also referencing a chat service, which is...
4 Jan 2017 by Dave Kreskowiak
Basically, you're trying to get/set the value of url on a variable that doesn't contain anything, it's null.It's up to you to figure out why that variable is null instead of holding the object you think it does.
24 Jul 2017 by Ahamed Thamseer
I am new to node, express and socket.io. I am trying to build a game using these technology.. I have global.js which i am using as server side. every action from client side to side or vice versa works fine. Now i am trying to build a computre player. So I have created bot.js file in server...
24 Jul 2017 by Ahamed Thamseer
I fixed it... I used var soc = this.socket = io.connect( ip, { "force new connection": true } ); ........... soc.emit('joinTable', args); //instead of using client i used soc.emit() in bot.js
22 Feb 2018 by ilhomelv
//Client JS File var socket = io.connect(), userEnterDiv = document.getElementById('userEnterDiv'), userNameErrorMsg = document.getElementById('userNameErrorMsg'), userNameInput = document.getElementById('userNameInput'), enterBtn = document.getElementById('enterBtn'), ...
22 Feb 2018 by ilhomelv
//in case If front page Chat #userEnterDiv{ } #mainDiv{ width: 600px; height: 500px; margin: left; border: 1px solid...
13 May 2018 by Member 9550975
I have a Client routine that works like a charm from an XP computer to another XP computer. When I use the same routine on a Windows 10 system I get an unhandled exception saying " A connection attempt failed because the connected party didn't respond in time. Imports System.Net.Sockets Imports...
13 May 2018 by Jochen Arndt
tcpClient.Connect("127.0.0.1", 8000) That will try to connect to localhost and not to another system. So you will get the seen error message when the server application is not running on your system.
20 Nov 2018 by Hitesh Rohilla
Installed NodeJS and set NPM using instructions provided in the following link How to install and configure Node.js on managed hosting accounts[^] I run the application and it's running in terminal but not able to communicate through it using frontend. I am trying simple SocketIO chat. The...
23 Apr 2019 by DoingWork
How to detect closed TCP connection when Client disconnected disgracfully i.e sudden power off ? Following method don't work when client disconnects disgracefully. What I have tried: if (socket != null) { bool part1 = socket.Poll(1000,...
23 Apr 2019 by RickZeeland
I used something like this: bool connectedLocal = true; using (var socketTemp = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)) { socketTemp.Connect(ip, port); // Loop until prg...
26 May 2020 by Member 14845028
I am building a flutter auction application, I am stuck at the countdown time of an auction product so I use firebase realtime database. I have to make sure all users see the countdown at the same time. Please help me whether it's just a keyword...
23 Dec 2020 by User 14994623
A server program which accepts requests from clients to capitalize strings or finding the factorial of any number (You have to provide both functionalities), When a client connects, a new thread is started to handle it. The Server will process...
23 Dec 2020 by OriginalGriff
Quote: I am trying my best from the past few days. But I am not getting the solution. I got many errors which are variable not defined, can't use static/private classes, IOException. That's why I come to the conclusion to get some help. So...
5 Jan 2021 by ynjay
I'm using Socket.IO to send some numbers and string to an array. However, it keeps converting everything to a String so I get an error message. Additionally I'm using ml.js for the models, the model logic is based of their random forest alorithm...
10 Mar 2021 by lukeer
Hi forum, to use Socket.IO, our server has to use a library called flask_socketio. Its clients will be browsers. They need a Socket.IO implementation, too. Therefore, the index.html that the server distributes includes
24 Feb 2021 by Richard MacCutchan
Did you try Welcome to Flask-SocketIO’s documentation! — Flask-SocketIO documentation[^] ?
5 Apr 2021 by Member 14743579
I am trying to connect multiple devices with server using same port number with the help TCP but i am not able to understand the logic to how to connect multiple devices with server using same port and how to communicate with device after the...
5 Apr 2021 by Richard MacCutchan
Whenever a client connection request is accepted by the server, the system returns the new file descriptor for that socket. So you need to keep a list of all socketfds as the server accepts them in order to know which client you are communicating...
5 Apr 2021 by Greg Utas
If you want to look at some C++ code for a thread that handles TCP, on either the server or client side, here[^] is an example. Start in the Enter function on line 332. This has been tested under load on Windows. The comments in its header[^]...
29 Apr 2021 by hado25
I am trying to stream a webcam feed from a python server using cv2 video capture to a c# ,the client connects to the server without a problem but nothing shows on the pictureEdit(devexpress pictureEdit control); What I have tried: This is my...
20 May 2021 by Richard MacCutchan
Quote: Is there anyone do homework that they post on page socket io chat app If there is, this is not the place to find them.
3 Nov 2021 by Mahathir Mohammad Shuvo
I host a flask app in Ubuntu 18.04 LTS with Nginx and Gunicorn. I use Flask-SocketIO==5.0.1 for backend and "https://cdn.socket.io/3.1.3/socket.io.min.js" for front end. here is my server configuration: server { server_name toollaza.com; ...
19 Nov 2021 by Greg Utas
You are asking a BIG question, and it isn't clear what you need help with. The following is based on my understanding, but I am not an expert in this. An exchange has a wallet of its own. This wallet holds all of the tokens that users have not...
6 Dec 2021 by Morad Abdelrasheed
Hello there, I was making a HTTPS server in java from scratch for my school project, and I encountered an error. I put an upload feature for users and it sends data using multipart/form-data. The problem is that any request over 16384 bytes...
8 Mar 2022 by lukeer
Hi forum, atm, I'm able to 1) Use Visual Studio Code's debugger on my flask socket.io application and 2) serve clients that are not my development machine but not both at the same time. To use the debugger, I just hit "F5" from within VSCode....
8 Mar 2022 by lukeer
Hi forum, there's an application ("the backend") using python flask socket.io. Multiple browsers ("the frontends") may connect to this application at the same time. One of the use cases requires that the backend sends a message to one of the...
25 Oct 2022 by Dave Kreskowiak
You're going to have more load on the server no matter what you do. The data is always going to come from the server. You either start up a timer in your client javascript and call an API method to get the data, or you can setup a SignalR...
1 Nov 2022 by Деян Цонев
I am trying to make tcp client and server. When client recv() for second time the following error occures: "Resource temporary unavalible". This is my client code: int CreateSocket(int fd) { if ((fd = socket(AF_INET, SOCK_STREAM, 0))
27 Dec 2022 by Shibiliya Ismail
I am building a chat interface in my laravel website. I get the following error in my chat page. GET http://127.0.0.1:8000/socket.io/?EIO=4&transport=polling&t=OLNuZgo 404 (Not Found) Here is my code : server.js var app =...
13 Feb 2023 by Gustavo Rodrigues 2023
I am using the simple-peer and socket.io libraries in a react project, to transmit a video stream and display it to all connected devices in a websocket room, I can receive the stream on the other devices when the stream starts but it does not...
22 Feb 2023 by Chopin2001
Sending data to client using socket in node.js In this case, we assume that we are using emit/send function, not createReadStream. What I want is to send data to the client via emit/send function every time the for loop runs once. What I have...
17 Jul 2023 by Rob Philpott
You haven't stated whether your exception handler gets called - if it does it would be interesting to know the exception. It's hard to know exactly what's going on here without a debugger.. That said, the timeouts you have (60) are in...
11 Sep 2019 by honey the codewitch
A simple home HTTP server that works across all .NET platforms
14 Sep 2015 by Sander Rossel
The eighth in a series on MEAN web development.
28 Mar 2016 by Prince Cheruvathur
Step by step development of a Node.js application in Typescript using Express and MongoDB with real-time update using Socket.io
N 16 Mar 2024 by Line Item
I would try running this from a command line, with some adjustments for that to make it a simple command. Get that to work then add to that a little at a time. Maybe then try moving that to PowerShell. Get that to work then add more until you...
23 Apr 2019 by User 11060979
TCP keepalive These looks promising, answer 3 in .net - Instantly detect client disconnection from server socket - Stack Overflow[^] and also here: http://tldp.org/HOWTO/TCP-Keepalive-HOWTO/overview.html[^] I hope it helps.
12 Oct 2015 by Hamdy Sdiri, Ahmed Damak
Installing socket.io on node.js on Windows 8
14 Sep 2023 by Zenich TUW
I have the following issue: I'm building a chat using Node.js, Socket.IO, and MongoDB. Everything is working perfectly, except for the real-time aspect. For instance, when 'Sebas' sends a message to 'Gene', 'Sebas' can see that their message has...
21 Jan 2020 by Doug- VisualBasic VB.NET
This seems to be how you are gathering you clients. How are you defining the client to send the message to?
25 Oct 2022 by ravithejag
I want to implement a solution where my web page has to be refreshed whenever there is an new entry in our Influx/SQL Database. In current scenario we are refreshing the data every 5 seconds over WEB API built on C# , due to frequent calls to...
26 May 2016 by Henrik R L
I have a hardware device that acts as a server and communicates with TCP (Socket). After connecting to the device the device will disconnect if there has been no communication for 5 seconds. This is because it must allow other client programs to connect to it when the device is not used.Lets...
13 Jun 2016 by Jochen Arndt
After the client has closed the previous connection it tries to open a new one. This attempt is acknowledged (ACK) by the server but not accepted (RST). So the client tries it again which is indicated as "TCP Spurious Retransmission" by Wireshark (the packet itself is a SYN packet identical to...
10 Aug 2016 by Member 12330615
Hi,I have coded program using VC++.I want to get the ip address of my local PC.First I tried to get that informations by using gethostbyname() in VC++.But compile error make that: 'gethostbyname': Use getaddrinfo() or GetAddrInfoW() instead or define...
19 Nov 2021 by Member 15436954
Good morning everyone, how are you? hope so. So I am seeking insight into an issue involving the logic behind programming a cryptocurrency exchange. I'm trying to understand how every internal issue of an exchange works. Come on. I want...
26 Jul 2023 by headshot9x
i have connection to the server. After connected successfully, I can see the connection via CMD netstat command netstat -a -n. But after about 21 seconds, the connection changing from ESTABLISHED to CLOSE_WAIT . I want to the connection always is...
26 Jul 2023 by headshot9x
After spend more time to debug and see transfer data, I get this one, and it's working well until now for me. So, if anyone get the issue like me, can try this way below private async void _connect() { var serverEndpoint = new...
8 Jan 2024 by Harshith M from Hyderabad
I'm trying to send a message to the receiver from frontend. As per backend it worked fine. But in frontend I had a pretty hard time to implement the backend code in the frontend to send a message to the receiver. I'll lend you my server side code...