Questions tagged [websocket]
WebSocket is an API built on top of TCP sockets and a protocol for bi-directional, full-duplex communication between client and server without the overhead of HTTP.
25,782
questions
0
votes
1
answer
10
views
Websockets alongside a python http server
I'm trying to figure out the best architecture to support connections to thousands of websockets alongside a managing HTTP server.
I want to be able to manage all of the connections through the HTTP ...
0
votes
0
answers
21
views
Extracting data from HTTP header in C
I want to extract some data from an HTTP header using C to perform some checks. This is the code that I am using to extract the data. Here I am just trying to check whether the Sec-WebSocket-Key is 13 ...
-1
votes
0
answers
5
views
Web socket with react
My project is built with websocket and react js.
When I input one letter on input tag, I can't type more letter.
"focus on input tag" is disappeared now.
If you know reason, can you tell me ...
0
votes
1
answer
14
views
How do I send data to the client when a process is done running on the server using socket io?
I have a long running process on the backend. When it is done:
broadcast it to all clients currently connections.
send it to a specific connected client.
How can that be done?
0
votes
1
answer
7
views
I'm trying to stream data from alpaca API. Using json.dumps gives me error code: Object of type set is not JSON serializable
Image of code
Tried json.stringify
1
vote
0
answers
21
views
Django channel convert to live score board
By following Django Channel documentation I successfully ran a simple app that can two way communicate between client and server. I have three pages with a button and variable (c1,c2,c3) respectively ...
0
votes
1
answer
10
views
Getting valid data as well as Internal Server Error from AWS Web-socket API Gateway
I am trying to implement a web socket based communication using API Gateway. Going as per the docs, I have been able to make a basic communication using Lambda integration.
However, whenever I post ...
0
votes
0
answers
8
views
Unreal Engine + Websocket + SSL Certificate
Here is an insallation I manage to create :
Unreal Engine is a graphical video game engine.
I've installed a plugin which can create a websocket server and a websocket client.
So I can perfectly make ...
0
votes
2
answers
18
views
Websocket connection between two servers with one server as lambda
I want to setup a websocket communication between two servers - Server A & Server B.
Server A will receive messages from user application, Server A will process the message and route the message ...
0
votes
1
answer
18
views
Using FastAPI for socket chat system?
How would one implement a comprehensive chat system using sockets within FastAPI. Specifically keeping the following in mind:
Multiple Chat rooms many-to-many between users
Storing messages with a ...
1
vote
1
answer
31
views
Server refusing to connect to Websocket client
I am relatively new to C and C++ programming and I am trying to connect to a Websockets server using the boost and beast libraries in C++. I followed the tutorial here but I get the following error
...
1
vote
1
answer
44
views
For is looped through but only executes the find() function inside after 3 iterations
I'm trying to get the information from all vehicles present in the database, through their license plates. When I execute the code, it loops 3 times, which is how many cars are currently registered ...
0
votes
0
answers
10
views
Flutter notification with django channels
Please explain me how can i implement flutter notification with django channel socket
. I am not getting any idea to connect flutter to the django socket channel for notification .
-1
votes
0
answers
18
views
Fetch data from websocket with what seems a dictionary without key
I am very unexperienced with this.
But I cant find a way to fetch the data from !ticker@arr
could you by any way help me?
I try different ways such as
def on_message(ws, message):
try:
...
-1
votes
0
answers
15
views
Missing messages from websocket server using select
I'm currently developing a connector for Binance futures.
I'm using websocket-client package for the websocket part.
It seems to work well but during the tests I realized that I'm missing messages ...
-1
votes
0
answers
7
views
Spring Boot websocket autowiring with Spring DataJPA gives nullPointer exception [duplicate]
I'm trying to use Spring Data JPA to make a timed-quizz app. It gets the questions from the database when the socket opens and sends the data to the client after that . I've implemented the websocket ...
0
votes
0
answers
13
views
In a WebSocket connection how to determine who is terminating socket first? Client or Server? [duplicate]
I have opened a socket connection via Chrome console, which connects to my Java WebSocket server running locally - then closed it:
var webSocket = new WebSocket('ws://127.0.0.1:1234/support');
...
1
vote
1
answer
51
views
How to use your own Monad in servant-websocket's conduit endpoint?
I'm trying to figure out how to use a custom monad in the ConduitT definition of the WebSocketConduit endpoint provided by the servant-websocket library.
Say that I have this API:
type MyAPI = "...
0
votes
0
answers
20
views
manage.py runworker: error: the following arguments are required: channels
we have a chat application with daphne and Redis servers. web socket is working when there are few requests but as requests increase we start to get 503 error and the connection closed out. We are ...
0
votes
1
answer
15
views
Why does my web socket call fail when server has a base url?
I am facing a strange problem. I have a express backend server. When I do not have a base URL for my backend, the ws calls are working fine:
But, if I add a base URL ( for example, adding /api/ as ...
0
votes
0
answers
17
views
Error after websocket connection disconnects discord gatewway
I've been trying to write a code that connects to a websocket from the Discord gateway but sometime in the middle I get the following error caught through a logging module:
ERROR:root:exception in ...
0
votes
1
answer
24
views
Streamlit image not being updated
I am pretty new to the Python world and Streamlit, and trying to set up a small app with Streamlit that connects to a websocket and updates the image on every message. I have the following two files ...
0
votes
0
answers
37
views
How can I detect an empty line in a text stream and print everything below it?
I am trying to use strcmp and fgets to read line by line to detect "\r\n".
I'm working in a program with websockets and I want to show the HTML code in my console that it is written in the ...
2
votes
1
answer
29
views
missing some messages in websocket client?
I am trying to implement a websocket client that connects to the popular crypto exchange FTX. I have simplified my problem to the following example code below:
import asyncio
import websockets
import ...
-2
votes
0
answers
26
views
WebBrowser not closing WebSocket connection
Hi I have a WebBrowser control in WPF Application, hosted inside a WPF TabControl. This control hosts an Angular 10 application which opens a WebSocket connection (WebSocketServer is WebSocketSharp). ...
0
votes
0
answers
18
views
.NET 6 websocket performance
I recently upgraded a .net core 3.1 app to .net 6 and was rather surprised by how much more efficient it seems to be. The application's purpose is to basically send some one-way notifications to ...
0
votes
0
answers
14
views
Python websockets - message send with success after 'Broken pipe' error
I have server and client written in python. My server is implemented using asyncio and library called 'websockets'. This is asynchronous architecture. Client from the other hand is implemented in ...
0
votes
0
answers
37
views
Websocket not working with django on deployment
i hope that u can help me.
I deployed my django application to an ubuntu 20.04 server with nginx and gunicorn.
This is my settings:
gunicorn.service
[Unit]
Description=gunicorn daemon
Requires=...
0
votes
0
answers
20
views
Connecting to AWX tower websocket in order to get playbook logs
I asking your help today because I can't find a response to my questions.
I want to connect my backend (running with fastAPI) to AWX tower websocket in order to get logs in real time when I launch a ...
0
votes
0
answers
8
views
Access Smart devices and open specific App using Angular 8 from windows
I need to access android OS supported Device and open android application from Angular App which will be deployed on IIS Server,
Is there any possibility that we can access hardware from clients ...
0
votes
0
answers
5
views
Limit number of AWS IoT topics that a browser session subscribes to?
We want to broadcast changes in our many DynamoDB data partitions to many relevant web browser sessions through WebSockets. To limit the cost we want that a browser session can subscribe to the ...
0
votes
0
answers
19
views
How to process websocket messages concurrently in Python with asyncio?
I have the following simple implementation of a websockets program (it's actually in Flask, but I don't believe it's relevant for this case):
import asyncio
import websockets
from flask_socketio ...
0
votes
0
answers
8
views
How to connect 2 different clients to one SOCKETIO server
I basically have a website client which plays audio and a java client which hands over PLAYER Coordinates to the Socket IO Main server.
How do I seperate the clients to know which one is which.
1
vote
0
answers
14
views
Websocket 502 Bad Gateway
I've two container wsgi and asgi.
wsgi server is running on 127.0.0.8000:
gunicorn app.wsgi:application --bind 127.0.0.1:8000
Also asgi server is running on 127.0.0.1:8001 using of daphne:
daphne -b ...
1
vote
1
answer
16
views
Flutter: what is the best practice for auto & periodic update of a flutter element
I'm trying to build a flutter app
which shows a chart that reads data from a MySql database (a table)
I want to update the chart
when the data in the table is updated
without manually refresh the page
...
0
votes
0
answers
12
views
How to perform websocket login?
Our current permission system is based on token authentication, the specific architecture is as follows
The user enters the account password to log in. After the password verification is passed, a ...
0
votes
0
answers
30
views
WebRTC video streaming - javascript & python
I have 4 clients (web pages) that contain video streams and I have to send all of them to server which will make some editing with openCV. After that, server should send all of video streams to one ...
0
votes
2
answers
29
views
Websocket response data undefined in global variable
I would like to use the global variable data and assign the WebSocket response data to it but
inside the function the data is displayed outside is undefined.
How can I solve this?
var data;
client....
0
votes
0
answers
8
views
NestJS & Heroku - Connecting to the gateway requires enabling the VPN
async function bootstrap() {
const app = await NestFactory.create(AppModule);
app.useWebSocketAdapter(new GatewayAdapter(app));
app.use(cookieParser());
app.use(helmet());
await app....
0
votes
0
answers
33
views
C# ClientWebSocket doen't receive incoming messages until an outbound message is sent
I'm trying to receive messages from a server in real time, ideally using the ClientWebSocket class. I would like to both send and receive messages on their own. Unfortunately, I always first have to ...
0
votes
0
answers
12
views
Connecting two servers via Socket.io
I have two applications. The first is for nodes, and the second is for nests. They must exchange some data among themselves. I'm trying to implement this idea, but it doesn't work. I'm new to this.
...
0
votes
0
answers
10
views
Converting HTTP Stream to Websocket Connection
I am having a hard time understanding how HTTP Streams work. I am currently experimenting with the Oanda streaming API, but having a hard time understanding how i will go about converting this request ...
0
votes
1
answer
22
views
Websockets run client side and server side in 1 script with asyncio
I have 2 Python scripts running currently, 1 is client side script and 1 is server side script. They run perfectly ok. But, I want to combine both into 1 script to optimize data transfer. Below are ...
-3
votes
0
answers
25
views
Nodemcu (ESP8266) WebSocket Client Example [closed]
I want to connect to a WebSocket url (like ws://exampleIP:8765/) with Nodemcu and only print (or just a led blink) the message from there. There are many libraries but I couldn't get them to work. Can ...
0
votes
0
answers
23
views
SignalR Host No connection could be made because the target machine actively refused it
so currently i have a SignalR hub and an ASP API in the same project, all works fine and well ofcourse, however putting it onto the remote it'll give errors while connecting:
System.Net.Http....
0
votes
0
answers
14
views
How do you best set up Socket.io with React to ensure you have a socket connection and can adjust state accordingly?
I'm trying to set up Socket.io with a todo app to do live updates. Basically...
function App() {
const [socket, setSocket] = useState(null)
useEffect(() => {
const newSocket = io(server);
...
-1
votes
1
answer
37
views
WebSocket ssl not working in google chrome [closed]
I'm using reactphp and ratchet libraries websocket wss://web:port secure connection with parameters 'local_cert' and 'local_pk', it works on the firefox, but not working in google chrome(WebSocket ...
0
votes
0
answers
18
views
Spring boot Web Socket Connection loosing connection on production
I am using Angular, Spring Boot, and WebSocket in my project. I'm testing on my local machine socket connection is working fine but when I deployed my build on the production server it is not working ...
0
votes
0
answers
20
views
is it efficient to store my online socket server users on redis?and if yes then how?
I am building a web socket application using node and i want to store my currently connected users ,so i saved it as a user Id key and socket Id value but when the user disconnect i only knows it's ...
0
votes
0
answers
11
views
My Websocket works only on localhost and not on nginx
I am working on an application, I used nodejs express as the server and reactjs for the client.
Here's my config for the server for socketIO
const server = app.listen(port, () =>
console.log(`...