Click here to Skip to main content
15,890,741 members
Everything / WebSockets

WebSockets

WebSockets

Great Reads

by Darko Jurić
WebSocket RPC library for .NET with auto JavaScript client code generation, supporting ASP.NET Core.
by Gwyll
We're in a Dark Age when it comes to Software Development. We need a Renaissance.
by Jaime Olivares
An architectural proposal to integrate mobile and .Net applications
by tonywilk
Example server and client using different protocols over a Websocket (php/js)

Latest Articles

by Gwyll
We're in a Dark Age when it comes to Software Development. We need a Renaissance.
by Michael Chourdakis
A quick way to interoperate between Win32 and a browser using WebSockets
by Sandeep Mewara
See with a working demo how SignalR works and how it can be used
by Silvia Campo
I've been using web sockets the same way as a regular http request; I wasn't using them to their full potential...

All Articles

Sort by Updated

WebSockets 

16 Feb 2024 by Andre Oosthuizen
You have basically answered your own question without knowing it - Quote: Then I made my consumers.py (here I'm a little bit confused, isn't it better to refer to my room unique_id instead of name, since the ID is unique and not the name in my...
16 Feb 2024 by gsemerdz
I'm trying to establish a connection with my Django backend and Flutter code using WebSockets, but unfortunately I'm unable to do so, went through many articles and videos and everyone is basically doing the same without receiving an error.....
26 Mar 2023 by OriginalGriff
So if you are waiting for permission to start doing the research you describe, then consider it given. If you aren't then while we are more than willing to help those that are stuck, that doesn't mean that we are here to do it all for you! We...
12 Jan 2023 by kksingh.hrp
Step 1: dynamic response = JsonConvert.DeserializeObject(json); Step 2: JArray paramsArray = (JArray)JToken.FromObject(response); Step 3: foreach (JToken param in paramsArray) { CustomerRoot...
12 Jan 2023 by Jakobson 2022
Hello, currently I am working on WinForms application that has been communicating with API which is based on websocket as a transport protocol where each message is json encoded object. I want to loop through each array in params JArray, take...
5 Jan 2023 by jonathan rogers Dec2022
just start learn WebSocket and made chat with Node js. But if user disconnect i dont know how delete him in page(so that other users can see that he has left). I This my localhost on Node.js, I think need delete user from array users but it dont...
5 Jan 2023 by King Masr
To delete users from a chat room in a web application using WebSockets and Node.js, you will need to implement a mechanism for removing the user's connection from the list of active connections. Here is an example of how you could do this using...
2 Jan 2023 by detectivejd
how are you? I hope that you are good, I have a question, how can I do to the server consume multi clients? I put all my code Server using System; using System.Net; using System.Net.Sockets; using System.Text; using...
2 Jan 2023 by detectivejd
I resolved the trouble, All that I needed it was encode the messages to that the server had hability of notify other client messages, also I had to create a client list to get all connected clients and detect the real time notifications from the...
21 Dec 2022 by OriginalGriff
A Socket is a point-to-point connection: one server, one client. To support one server, multiple clients, you need multiple Sockets: one per client. The easiest way is to setup each client as a separate thread which creates a socket and stes it...
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...
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...
16 Sep 2022 by Gwyll
We're in a Dark Age when it comes to Software Development. We need a Renaissance.
7 Aug 2022 by Tony Hill
Shouldn't you be comparing using the strict equality operator === and not equality operator ==
7 Aug 2022 by Abdalla Roda
I am trying to scrape a website that receives instructions on what to render through a WebSocket connected with the backend. So on every WebSocket frame received, i will get the content of the page run it through a function that builds an object...
4 Jul 2022 by Richard MacCutchan
The paramsArray variable is an array of arrays, not an array of JSON objects. So you probably need something like: JArray paramsArray = (JArray)jObject["params"]; List listName = new List(); foreach(JToken param in paramsArray)...
4 Jul 2022 by Jakobson 2022
I've found out how can be done after spending a while, through the while loop I hardcoded the last index number of child arrays, and then do the iteration over all, maybe there exists different solution for this, but for now this logic for me...
4 Jul 2022 by Graeme_Grant
Here is how to pull the doneyears: //List listName = new List(); Dictionary> map = new Dictionary>(); foreach(JToken param in paramsArray) { string name =...
30 Apr 2022 by Michael Chourdakis
A quick way to interoperate between Win32 and a browser using WebSockets
29 Apr 2022 by Martin Lejeune
Hello everyone, First of all I'm not native english speaker so sorry for the mistakes I'm going to write. I need to develop a quizz webapp with Springboot. I learn java since 7 years but never work with multithreading and websockets... I'd...
3 Apr 2022 by Member 15589097
Im trying since a couple of weeks to create a chain of WebSockets clients, to form a middleware pattern. Like in express/connect where you call `app.use(() => {...})` but with WebSocket clients. Illustration about the data/events flow:...
26 Mar 2022 by Mahdi Salah
Hello there, I am working in Laravel and web socket but I get this error : preg_match(): Argument #2 ($subject) must be of type string, array given and the error log you can see via that link: Laravel error tracking – Flare[^] Any...
28 Feb 2022 by Member 15550837
I have a Django website and I have a real-time "game" on it. Multiple people connect and play it. Every X seconds the users in the specific game will be getting updates. I have done this using WebSockets and it works, I would say, pretty good....
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; ...
14 Oct 2021 by João Telemovel
So I am doing a project where I upload a .txt file with gps coordinates of a train and when I press start the train starts moving on a map following that coordinates. I allready have a range bar on the page, but my question is... Is there any...
14 Oct 2021 by Patrice T
Quote: Is there any way that I can regulate the speed of the "train" on the map? Making him go slower or faster? Have a look at timers. JavaScript Timing Events[^]
24 May 2021 by TheBigBearNow
Hello all, When my site is deployed and multiple people as using it I am trying to understand if my server were able to handle these requests from multiple people. At first itll only be 10-20 people but I plan on it growing. On the UI since its...
24 May 2021 by Chris Copeland
Asynchronous Server Socket Example | Microsoft Docs[^] The above might help you out, it depends on how you've implemented your accept/receive endpoints. In theory your socket should be handling connections and reception of buffers on a separate...
13 May 2021 by Zeke Anderson
Since Websockets work over TCP and not HTTP, why do we still call it HTTP-push based technology. Apologies if it's a silly question. I am new to client-server architecture. What I have tried: why do we still call it HTTP-push based technology
13 May 2021 by raddevus
Because push-based means you don't have to poll anything. In the case of websockets you set up the socket and then it is event-based -- when something changes on the server then the client is automatically "pushed" the changes. In previous...
7 May 2021 by TheBigBearNow
Hello all, I have a .Net Core application and I’m using the Binance.Net API. I want to show the trades coming in real time and update my View with the current trades. I’m not sure the correct way to do this. Possibly ajax? The data that is coming...
17 Aug 2020 by bigbits
I hope someone can help me I have looked and I know very little about websockets. P.S: We are working in a legacy code so it is pure php ( no laravel, symfony, nothing ) We have a partner that our server will have to listen to their websocket...
17 Aug 2020 by Sandeep Mewara
There are multiple examples on web with PHP/Websocket, please have a look at them: Simple PHP Chat using WebSocket - Phppot[^] Create a Bi-directional Connection to a PHP Server using HTML5 WebSockets[^] PHP and HTML5 WebSocket server and client...
19 Jul 2020 by Sandeep Mewara
See with a working demo how SignalR works and how it can be used
15 Jul 2020 by triyul22
I have 2 clients in asp.net with difference by url: localhost:port/api/send and localhost:port/api/new I'm using websocket and trying to send the message that "send-client" send (sorry for repetitiveness), but catch an exception The server...
15 Jul 2020 by Garth J Lancaster
Not sure what you mean by Quote: when trying to connect to another client uri but anyway, looking at the code you've got, I take it you've verified the server is running and a netstat -an | more shows 'something' listening on port 49350. If...
30 Jun 2020 by Member 12242717
I have try some simple code to receive message respond from server connecting through web socket but i cant receive any message from server. But when i test it using online web socket connection it shows the message. I want async websocket for...
30 Jun 2020 by OriginalGriff
using is a very specific keyword in C#, it's used to control teh disposal of items when they ar efinished with. Writing this: using (MyClass mc = new MyClass) { ... } Is the equivelant of writing this: { MyClass mc; try { mc = new...
18 Apr 2020 by Member 13702159
I created a web socket client using this lib https://github.com/TooTallNate/Java-WebSocket/blob/master/src/main/example/ExampleClient.java Could you tell me how can I stop the main thread and recaive a proper serverResponse value? My code: ...
19 Mar 2020 by serchat_chasan
Hi to all, I am a full stack developer. I'm wondering to find a solution in android background. I'm thinking to write a push notification system for all mobile device types (android,ios) and for web browsers (i mean for web clients). I already...
28 Nov 2019 by GeoFinex
Hi i am working on an autotrading financial WebApp whereas i am using their WebSocket api, below is the minimal javascript code... Each client have their specific auth token to execute trade on the broker server on their behalf, and the token is passed through the WebSocket request. But the...
9 Mar 2019 by rfl.souza
I did some research and did not find anything, ISAPI is old but I have a lot of things and stable, I wanted to know if I can use websocket on it. I did not want to use a specific port for the Server. I want everything running behind IIS on port 80 or 443. What I have tried: I searched on...
9 Mar 2019 by davercadman
Hi I can't find anything on isape websocket either. I do think this is a viable way to go. The way I see it is the browser is able to do it - then the server has to comply with the browsers calls. So if you handle the "UPGRADE" in your isapi then why not?!? I am going to work on this and...
27 Sep 2018 by Dave Kreskowiak
This doesn't make sense. ISAPI is used for writing extensions and filters to IIS. Web sockets is used for TCP/IP communication between a client and a non-web server listening on a port. That port can NOT be port 80 or 443 because those are taken up by the HTTP server. What are you trying to do...
11 Sep 2018 by nmeri17
I'm planning to work on a web project that requires concurrency. I have past experience with websockets and would favour using it again, although I've learnt about xamp and jabber and might be willing to explore if they're more viable. I recently learnt about CRDT (from figma) and while, from my...
2 Aug 2018 by ranio
I am doing handshaking via web socket connectivity. My message for handshake has reached server but the connection is not remaining alive or so. I need to maintain the connection state even after handshaking. I am using ClientWebsocket. Below is the exception got: The 'Connection' header value...
29 Jul 2018 by ilostmyid2
oh i found something! in mod_websocket.c, in function handle_websocket_connection, before calling conf->plugin->on_connect which is indeed ws_stream_on_connect, apr_thread_mutex_lock is called on state.mutex. then in mod_websocket_plugin_send we see the lock again. BMO, this means that...
29 Jul 2018 by ilostmyid2
In the following code: #define Uses_Info #define Uses_WebSocketServer #include "ws.h" int on_connect(WebSocketServer *server); void on_message(const char *buf); void on_disconnect(); void* CALLBACK ws_stream_on_connect(WebSocketServer *server) { Info("ws_stream_on_connect"); int n = 5;...
28 Jul 2018 by Manfred Rudolf Bihy
Maybe an exception was thrown ? You can wrap the server-> send in a try/catch statement and log a message in the catch block. BR, Manfred
25 Jul 2018 by ranio
I want to fetch and pass the imported SSL certificate as trusted while connecting to the web socket in c#. Currently I am using websocketclient but getting the SSL Certificate Exception even after importing. I need to fetch it and connect to server related to handshaking. The underlying...
23 Jul 2018 by ranio
I am trying to handshake via web socket in c# to a server with Self Signed Certificate and got exception as below: Exception got as below: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. --->...
23 Jul 2018 by ranio
I want to pass Url parameters of a json string for handshaking via Web Socket in c#. The uri contains query string parameters and it is a json string.While trying to connect I am getting the exception that the URI scheme is not valid Current WSI Url not working: ...
10 Jul 2018 by ranio
I am having issue while trying to connect via web socket to a url with wss protocol. The hosted url with http works fine when i try to consume from client with ws protocol. But with https i get below exception. I created a self signed certificate in IIS and was able to start server. But while...
6 Mar 2018 by Silvia Campo
I've been using web sockets the same way as a regular http request; I wasn't using them to their full potential...
14 Feb 2018 by James Wright_
Getting to grips with TypeScript, and its compiler, in the context of Node.js
14 Jan 2018 by Darko Jurić
WebSocket RPC library for .NET with auto JavaScript client code generation, supporting ASP.NET Core.
1 Jan 2018 by Member 13602102
My node.js server randomly shuts down after a client has connected from a web and then closes the tab (simple disconnection). The server: var websocketServer = require("ws").Server, server = new websocketServer({port: 9000}); var date = require("./modules/date"); console.log("[" +...
20 Dec 2017 by ZurdoDev
As Richard said in the comments, you'll have to talk to your hosting company to find out if you can do this. I doubt they will allow it, but they may provide a way for you to.
30 Oct 2017 by Member 13495296
We are implementing Client WebSocket for our .Net Application using the ClientWebSocket class in System.Net.WebSockets namespace. We are calling ClientWebSocket.ConnectAsync Method (Uri, CancellationToken) for Asynchronous socket connection. And after the successful asynchronous connection is...
3 Oct 2017 by SagarPatil44
Currently I have implemented one secure server using TCPListener and trying to connect to it from client which is, Javascript application through browser. I am trying to communicate using SSLStream and proper certificate is provided using following method. private static X509Certificate2...
20 Sep 2017 by ZhEaIsNsAaBn
I wanna to build a stock exchange application : which is a form have datagridview and its data change in it immediately (reel-time) - it will be something like this => [
13 Sep 2017 by Jaydeep Shah
i am working on chat application (using rocket.chat) in this my web socket is closed after 1 minute if i not do anything. What I have tried: i not got any solution. give me any idea if any one have !
13 Sep 2017 by OriginalGriff
Web Sockets have an idle timeout of 60 seconds: if you do not use a heartbeat or similar via ping and pong frames then the socket assumes that the user has closed the page and closes the socket to save resources. In theory, you can get round this by disabling the timeout, but that may be...
2 Aug 2017 by Member 12756214
I want to build commercial server on ( c++ or c run on windows and Linux ) with maximum security possible , that send/receive data to the client ( html + java script vanilla ) What I have tried: Library : 1- Websocket server ( wss ) : https://github.com/uNetworking/uWebSockets 2-...
2 Aug 2017 by RickZeeland
There is a recent publication about OAuth 2, OAuth 2 in Action, it's more aimed at Javascript developers, but might be of interest to you nevertheless. Manning | OAuth 2 in Action[^]
18 Jul 2017 by Member 8685145
I would like to build a dashboard to show analysers data. They are very dynamic in nature and i would like to have it updated in realtime. I am thinking of using websocket for sending data from webserver to client. But, currently C++ is used to communicate between the analysers. How can I...
18 Jul 2017 by KarstenK
It is an interesting issue because the are different way to do the job. Take a look at this discussion at stackoverflow. Another interesting way is CGI as described in this tutorial. By the way multi threading is absolut necessary. Please publish an article about your results because I am...
24 May 2017 by raddevus
Use SignalR to create a Slideshow app which asynchronously updates all web clients so they see the same slide you are seeing.
22 May 2017 by raddevus
Learn to use SignalR to asynchronously update all web clients using SignalR broadcasts.
10 Apr 2017 by Member 13072690
I am doing a project related to php socket. My target is that I will show all client connected to server and show them in html file. However, if i put socket_accept() function in while loop, it won't break when no client connect. Now, I want to while loop only accept all client in 10 second and...
10 Apr 2017 by Member 13072690
Thanks, I have done it by using socket_select function.
6 Apr 2017 by Jochen Arndt
Wrong approach. If you stop accepting for 10 seconds, clients may run into time outs. Think about what you want. With your actual code there may be also only one client connected at the same time. So "show all client connected to server" makes no sense. Because your communication is very...
20 Mar 2017 by Member 13072690
I have a domain (ad-box.deslab.vn). I want to PHP socket to communicate with clients. However, After I run program, it has error:****Warning: socket_bind(): unable to bind address [22]: Invalid argument in /home/vietchip/public_html/deslab.vn/ad-box/index.php on line 27 socket_bind() failed:...
20 Mar 2017 by Jochen Arndt
You are calling socket_bind twice:// Bind socket to portsocket_bind($sock, $address, $port);if (socket_bind($sock, $address, $port) === false) { echo "socket_bind() failed: reason: " . socket_strerror(socket_last_error($sock)) . "\n";}The first call succeeds and the second fails...
17 Feb 2017 by OriginalGriff
Start with these:Using WebSocket in .NET 4.5 (Part 1)[^] - then look at the other three in the series (click on the author name, and then "Articles" on the right.This one's a little more basic: WebSocket Server in C#[^] If you need more, Google will find you loads of examples with a...
21 Nov 2016 by Catchy Agency
Qlik Playground is a free programming environment that allows you to explore, quickly test, and use your most complex and innovative data driven application ideas using Qlik technology.
23 Sep 2016 by Eugene Rudenko
How to handle websocket connection in Erlang app
14 Sep 2016 by Igor Ladnik
The article presents a collection of Web technologies. Multi-OS servers written in ASP.NET Core and node.js along with HTML / JavaScript / TypeScript single-page client construct scrollable table sample.
2 Aug 2016 by Vadyseri
A Story of One Video Streaming Project
1 Aug 2016 by Eugene Rudenko
How to handle load balancing of websocket connections.
31 Jan 2016 by Ehtesam Ahmed
hi I am trying to test the memory consumption for multiple websocket connection to my webpage. The website is hosted in local IIS server. I load the same page in different tabs and establish a websocket connection for data transfer. Problem is it only allows me to do it on three occation....
25 Jan 2016 by JuanFelipe Loyola Andrade
Hello, I have a server connected to a GoPro camera, which sends the images in base64 format, and can be seen on localhost, now I need to capture screenshot, but I can not, any ideas? Go Pro cliente
23 Nov 2015 by mlowry
I am new to websockets and am developing an application to run on an IIS server with connection to a Windows Forms client. The message-oriented app (read as byte streams) will have a mix of message sizes, from less than 1k to a max of 64k. It will also have varying frequency of messages, with...
14 Sep 2015 by Sander Rossel
The eighth in a series on MEAN web development.
10 Sep 2015 by Manoj Kumar Choubey
Please see following...
9 Sep 2015 by Member 11970398
i want to create a image slider using mvc razor viewhow to create side show in mvc razor html 5
27 Aug 2015 by Dharmesh .S. Patil
You can do it with ViewModels like how you passed data from your controller to view.Assume you have a viewmodel like thispublic class ReportViewModel{ public string Name { set;get;}}and in your GET Action,public ActionResult Report(){ return View(new...
18 Aug 2015 by Bharath K A
This is a HTML5 WebSocket service that streams live, real-time data to browser grid control. This service is capable of automatically computing math expressions on the fly (dynamically at runtime)
16 Aug 2015 by Bharath K A
Build your own cloud spreadsheet (like Microsoft Excel, google sheets) that exposes shreadsheet workbook via web browser. Users can create excel like spreadsheets using web browser save it, share it, put formulas to compute data in the sheet etc.
10 Aug 2015 by JR37
I'm working on a webpage which uses PHP to get the state of some servers located in the same machine (exactly 7 servers).When I was only getting the state of 1 server the page did load fast and everything was ok, but after adding all the servers it takes like 5 seconds to load and sometimes...
4 Aug 2015 by Richard Deeming
I've only ever seen this happen in Internet Explorer. Assuming that's the browser you're using, try executing the following javascript code when the page loads:if (typeof(document.execCommand) === "function"){ try { document.execCommand("AutoUrlDetect", false, false); ...
3 Aug 2015 by Suraj Dighodkar
i am using wysihtml editor if i paste "http://www.google.com" in wyshtml editor then pasted value comes in anchor tags as value instead of the value what i pasted . if i manually write "http://www.google.com" then anchor is dose not prefixed as a value.so i want the value without anchor tag...
28 Jul 2015 by Salman _Memon
Go to that link i hope it will help you
28 Jul 2015 by Member 11870612
I have created a website. I am facing the problem like, the alignments are differing from Browser to Browser and also when minimising the window.
26 Jul 2015 by Sergey Alexandrovich Kryukov
Preparing interview questions is pretty much useless. Please see my SSRS interview questions and answers[^].The questions like yours make no real sense. I have no idea if you use jQuery or not, and, if you do, why? Many other people do it because they don't want do some job which is already...
8 Jul 2015 by malhotraisha3388
hiwe have so many ways to pass data from view to controller and these are as follows:-1. ViewData2. ViewBag3. TempData4. using Modelfollowing are some links where you can get the code for this...
8 Jul 2015 by DamithSL
refer Getting Data From View to Controller in MVC[^]
8 Jul 2015 by Khushi Saraswat
I want to get view data on controller
23 Jun 2015 by Kel_
A clock rendered as 4 progress bars and published by the server in real-time.