Questions tagged [websocket]

1

votes
0

answer
186

Views

Websocket communication works with localtunnel but not ngrok

I created a little multiplayer game to learn how Python's asyncio worked. I tested everything on localhost first -- everything worked. I then used ngrok to expose my localhost so I could play with some friends. However, every time they connected through ngrok, their client never updated. The client...
Peter Wang
1

votes
0

answer
1.4k

Views

nodejs websockets subscribe to multiple channels

The end goal is for my nodejs program to subscribe to multiple channels supplying real-time financial information and processing the streaming data. In python it is possible to subscribe to multiple channels using the functools/partial and websocket. This allows one python program to subscribe to mu...
GerM
1

votes
1

answer
347

Views

How do I pass websocket instance to vue.js components and then call send() on it?

I'm trying to call send and send a message over a web socket to the server when clicking a button: // HelloWorld.vue {{ msg }} Send export default { name: 'HelloWorld', props: ['socket'], data() { return { msg: 'Welcome to Your Vue.js App', }; }, methods: { send: () => { this.socket.addEventListener...
chovy
1

votes
1

answer
73

Views

Is it guaranteed that subscription for response is established before request is processed in temp-topic based request/response scheme?

I would like to implement an request/response pattern in the following parts: Server: Springboot with ActiveMQ Client: JavaScript with stompjs over websocket I want a behaviour like an http request. Send a Request, get a corresponding Response. I try to do this with temporary channels I send 3 Mess...
Ralf B.
1

votes
0

answer
203

Views

Websocket: set manual id for client at connection

I want to realize a chat one to one with websocket. My client is a Xamarin Forms app (Android, iOs, Uwp) and backend is Nodejs. I can't use Socket.io because there's no well working nuget I can't use Xmpp protocol because there's no well working/update nuget I can't use Mqtt because is one to many...
Bluex
1

votes
1

answer
404

Views

ReactPHP - Working with Laravel and Timers

So here is a very interesting problem I am having. I am dead set on trying to figure out how to integrate a websocket client into Laravel 5.5 to allow communication over a websocket between my application and a Discord Gateway. I spooled up a new Laravel app and required this library, via composer,...
Dave
1

votes
1

answer
277

Views

how to response to the server ping in tornado websocket

I have written a websocket server in tornado and i used websocket_ping_interval=60 to detect which connection is really closed after 60 sec. but after 60 sec the server disconnects the link(even if it's been disconnected). i think this is done because the server sends a ping packet each 60sec and th...
amir ghorbani
1

votes
0

answer
132

Views

Kurento media server and android client socket connection stops working after 4-5 minutes

I am working on a Android VOIP call application, which uses Kurento Media server 6.6.1. I am using Nubomedia Android client to communicate with Kurento media server. Currently I am able to initiate web socket connection with media server and able to successfully communicate with server. But this wo...
Mandar
1

votes
0

answer
273

Views

Watch an API Endpoint with Socket.io

Im trying to set up web sockets to monitor changes at an API endpoint. I am able to set up web sockets across my native Node.js server and client. Server: var app = http.createServer(function(req, res){ //... }); var io = require('socket.io').listen(app); io.on('connection', function(socket) { con...
yevg
1

votes
0

answer
33

Views

How to implement web socket with Tapestry5-Hornet

I try to find an example how to implement web socket with Tapestry5-Hornet in my tapestry project. But, I can't find it. Can someone give me reference or example code to use this library?
Hobas Matius
1

votes
0

answer
430

Views

Connect to a websocket - setup by socket.io - without socket.io

I'm trying to connect to wss://streamer.cryptocompare.com from cryptocompare.com, using the go gorilla lib. Is it just me, or isn't this possible? They're using socket.io as their backend.
Mobilpadde
1

votes
1

answer
79

Views

Volatile variables in Server EndPoint for WebSocket Java API?

Looking at other examples across the web, when a server endpoint is created by means of Java API for WebSocket, the shared variables among all EndPoint instances are defined as static, but not volatile. I would like to know the reason. As I understand, the clients opening websockets will create a ne...
MickeyMouse
1

votes
1

answer
58

Views

Socket Exceptions due to density in Nodejs with WebSocket

I have node js server that is connected the 10k-14k client with WebSocket. When client count is up to above about ~14k, new clients begin to get the exception that: 'System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it' As far as I know, this...
Qwer Sense
1

votes
1

answer
377

Views

Stream information through a WebSocket received through ZeroMQ in Python

currently, I have a little script that receives a lot of information through various channels using ZeroMQ PUB-SUB sockets. What i want to do is: receive the info with zmq, process it, and then, send it away through a WebSocket, in order to be able to use it in an AngularJS application, displaying r...
1

votes
0

answer
87

Views

httpcontext is null for websockets signalr

I enabled websockets transport for my application using signalr 2.2.2. I could see the websockets transport enabled and applied as expected. At the same time, I could see null for Context.Request.GetHttpContext().ApplicationInstance. Here Context is of type HubCallerContext. Since the connection is...
SNithish
1

votes
0

answer
611

Views

Use nginx to reverse proxy websocket AND add SSL to avoid mixed content?

I have a service running that doesn't support HTTPS or WSS, and I unfortunately can't modify the service. As a workaround, I'm using nginx as a reverse proxy to add SSL for the HTTP connection, but the webapp is no longer working. Chrome dev tools give this error: Mixed Content: The page at 'https:...
agsl
1

votes
1

answer
174

Views

Etherscan.io websocket sending old transactions

looking to get the most recent transactions from an address using the etherscan websocket api. For some reason the websocket is sending me transactions that are 2-3 hours old. For instance: // Subscribing to binance address (as its an address with a lot of transactions): socketData.ether.send(JSON....
NCal
1

votes
0

answer
107

Views

Pagination over Spring Websocket

I have question for Spring Developers ... we are developing intern chatting application where need implement pagination and fetch data when it's needed. With websockets is created persistent connection with server, so my question is, if it is possible replace rest api with websocket channel, and fe...
Denis Stephanov
1

votes
0

answer
359

Views

WebSocket Request (xhr_send) getting stalled (Tomcat and Apache HTTP)

My application used sockjs & Application is running on Tomcat 8 and APACHE HTTP as front end web server. I have observed that xhr_send request getting stalled and so hangs the application. On Chrome developer console, received following error when xhr_send request stalled I never received CONNECTED...
Anupam Pawar
1

votes
0

answer
308

Views

Robust web Socket Streaming to Kafka in Java

I need to record from an unreliable web socket connection and stream into Kafka. Our Kafka cluster is pretty reliable and we can make it highly available. What is the best approach to make the web socket connection as reliable as possible? I would like to minimize data loss. One solution would be...
Daniel
1

votes
0

answer
148

Views

Implementing Socket.io in Angular service

I would use socket.IO in my angular application , specially in my service. I've implemented the emit function in my back end already. Here is my angular logique. import { Injectable } from '@angular/core'; import { NouveauProjet } from './models/nouveau-projet'; import { HttpClient, HttpResponse }...
Hamza Haddad
1

votes
0

answer
297

Views

Rails 5 actioncable ping disable

I see that the actioncable is sending a ping about every 3 seconds to all open websocket connections. It seems that the ping is send from here: https://github.com/rails/rails/blob/master/actioncable/app/assets/javascripts/action_cable/connection_monitor.coffee How can I disable the ping of the actio...
JohnDel
1

votes
1

answer
33

Views

Correct approach for websockets

I'm building an application and would like to know what the correct approach would be for using websockets to deliver in app live notifications. My app uses Express, Socket IO & Mongodb. I use Passport JS to authenticate users and something called passportSocketIo to connect Passport and Socket IO...
red house 87
1

votes
0

answer
33

Views

Connecting To WebSockets And Topics Through Python

I have a middleware layer that would take the place of my websocket server also, I have some clients not in JS but in Python that would need to connect to a particular topic and send some data. Now, my question would be: Where I could find an example in python of connecting to websockets, subscribin...
1

votes
2

answer
44

Views

Canvas is not updating even after setting interval

as the topic states. I have set the interval to give JavaScript a chance to update my canvas but it just won't. I am not experience with it, but the variables I am 'checking' (tried switch but that just breaks) have correct values - they are returned through a flask-socketio websocket on the servers...
nlhnt
1

votes
0

answer
172

Views

Node.js, ws-tcp-relay with nats: connection error

Please help solve the problem: When I start the nats server listening 4222 port: ./gnatsd --addr localhost --port 4222, then ./ws-tcp-relay localhost:4222 -p 4223 and try to connect through websockets using websocket-nats like this (in service.js for example): 'use strict'; const nats = require('we...
Rustam Dev
1

votes
1

answer
107

Views

How to connect valid websocket address

I have list of web socket server addresses.I stored it in Array List.In Array List there is only one valid web socket address.I need to connect that valid address.I used for loop but when valid address is in last index in array list its working fine.but when valid address before last index its not...
sheik
1

votes
0

answer
112

Views

How to distinguish web socket result of two subscribe channel?

I m new to web socket but now too much clear about how it work. My problem is here right below: I want to distinguish the result of two events. interface IWebSocketMethod { void GetTicker(); void GetOrderBook(); void GetTrades(); } abstract class WebSocket { private WebSocket4Net.WebSocket Socket; p...
Ashish Garg
1

votes
1

answer
205

Views

Can lua 5.3 do websockets?

I'm trying to build a very simple websocket client in lua, and I have found a number of libraries, but I have also found a lot of problems with each library. The biggest problem is that lua 5.3 is the current version, but no libraries seem to work with it. lua-websockets : will not work on lua 5.3 b...
Jeff Mikels
1

votes
0

answer
228

Views

Websocket performance on AWS EC2

I have issues with websocket performance on AWS EC2. I use websockets to listen to a server with incoming network rate 100-300 Kb/sec. Just listening, not sending. On EC2, every 10-20 minutes, I get disconnected (code 1006 - abnormal connection loss - no reason given). I have tested with t2.micro (w...
jam123
1

votes
1

answer
102

Views

Cancel a .Net WebSocket SendAsync Immediately

I am using websocket to send out message to 1000 clients. I want to cancel the websocket.SendAsync if the message was not sent out within 100 ms. My code is below. var cancelTaskToken = transport.GetTaskCancelToken(); cancelTaskToken.CancelAfter(100); var webSocket = transport.GetWebSocket().WebSoc...
David Chen
1

votes
0

answer
179

Views

Sending message to specific user not working in STOMP, sockjs, spring

I have an issue with Spring and Stomp, the messages are not being received by the client. I have tried everything and not sure what can be causing it! I have the following set up so far. The first subscribe /event/{eventId} works fine and is receiving messages. The specific user subscription reaches...
benjay_uk
1

votes
0

answer
308

Views

System.Net.WebSockets.ClientWebSocket and closure in C# .Net Framework?

I'm new to Windows development, coming from macOS and iOS development. I've to work with System.Net.WebSockets.ClientWebSocket to implement some sort of private push notification service. I other languages I'm used to closure / blocks / functional programming to handle events like a WebSocket messag...
ygini
1

votes
0

answer
558

Views

Opening a websocket connection in R to Binance

I can't find a way to make a websocket connection in R. It seems as if all of the libraries for websockets in R are depreciated. Has anyone found a way to make a websocket connection to Binance? https://www.binance.com/restapipub.html#kline-wss-endpoint
Federico Marchese
1

votes
0

answer
103

Views

Cannot connect to Jetty Websocket Server running on AWS Cloud9

I am currently trying to connect to a websocket server running on my environment in AWS Cloud9. The server is in Java using Jetty. It works perfectly fine running on my computer and on a raspberry pi. The client in AWS Cloud9 can successfully connect to my pi server but not the one running in AWS cl...
Kason
1

votes
0

answer
412

Views

How to keep Websocket connection opened while iOS App is in Background mode?

As the title says, how am I able to keep the connection open and receive messages even when the app is in the background? Because now, everytime i set it to background or i lock my iPhone and unlock it, the websocket gets disconnected. I've already found a solution and it says i should enable Voip i...
Dominik Brandstetter
1

votes
0

answer
890

Views

How to implement a simple WebSocket based protocol using RxJava on Android

I am writing a simple app to get started with RxJava, I am failing to figure out how to accomplish the following. I have a websocket connection, represented by a WebSocket object. The idea is to create an observable and start the WebSocket connection when someone subscribes to the observable. My cus...
Francesco Rigoni
1

votes
0

answer
87

Views

WebSocket error in common lisp

I want to make slack bot. I can not solve this error. (ql:quickload '(:cl-slack :event-emitter :websocket-driver :jonathan :cl-async ) :silent t) (defconstant +token+ 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx') (defconstant +channel+ 'xxx') (defvar *client* (make-instance 'cl-slack.core:slack-...
leaf_chage
1

votes
0

answer
544

Views

Firefox can’t establish a connection to the server

I have been looking into this for 2 or 3 days but could not find a solution. Firefox can’t establish a connection to the server at ws://localhost:35729/livereload See the error screenshot: See the following chromerealod.ts code: const LIVERELOAD_HOST = 'localhost:'; const LIVERELOAD_PORT = 35729...
Abdul Qadir
1

votes
0

answer
259

Views

Leaking memory using web sockets on tomcat

We are using Tomcat 8.5 on Windows server and experiencing memory leak caused by using web-sockets. The server web-socket looks like this: package ad.ecs.async.websocket; import java.io.IOException; import java.util.Arrays; import javax.websocket.CloseReason; import javax.websocket.OnClose; import j...
serge

View additional questions