Questions tagged [websocket]

1

votes
1

answer
710

Views

WebSocket Server (Java) cannot read but send to C# (Unity) Client

For a project in university we should build a multiplayer game. Cause I have quiet a lot experience in Unity I want to use it as Game Engine. We have to use WebSockets for communication and json as protocoll to carry the data. So far so good. C# don´t have a default websocket implementation, so I u...
Snubs
1

votes
2

answer
2.3k

Views

How to add parameters to a GET request in node.js?

I am trying to access the different information from the following api:https://api.coinnest.co.kr/doc/public.html and stumped in trying to get data for all the different parameters for the /api/pub/ticker request Here is the code I have written so far, but i cant seem to get any different info for d...
WasabiCannon
1

votes
4

answer
590

Views

AWS API Gateway Websockets — where is the connectionID?

I am setting up an AWS API Gateway Websockets with a custom authorizer on the $connect route, as described here: https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-route-keys-connect-disconnect.html My question is -- how do I get the connectionID, ie the identifier...
Big Endian
1

votes
1

answer
89

Views

Setup a basic WebSocket mock in AWS ApiGateway

I am trying to setup an extremely simple WebSocket mock within AWS ApiGateway. However, every attempt I've tried gives me an error: 13:36:52 (X33uOGUfIAMFq7w=) Extended Request Id: X33uOGUfIAMFq7w= 13:36:52 (X33uOGUfIAMFq7w=) Verifying Usage Plan for request: X33uOGUfIAMFq7w=. API Key: API Stage: re...
lightswitch05
1

votes
0

answer
8

Views

Tomcat virtual host with websocket “http_upgrade” configuration

I have a java application with web socket running on 8080 port on my server through tomcat like http://localhost:8080/application. But i am facing problem connecting to web socket i had it working fine with nginx with below code and want similar configuration for tomcat. Please keep in mind there is...
Aasheesh Bhardwaj
1

votes
1

answer
54

Views

Why isnt my sockets onsubscribe event getting used?

I am using java springboot with maven in order to get the spring boot starter socket package. My clients are using angular with stompjs and sockjs-client. I am trying to set up a simple web socket application that allows for multiple rooms based on a roomId. When a client joins a room they should re...
skyleguy
0

votes
1

answer
143

Views

Possibility of updating data in real-time on a client

I have the following scenario that I was wondering if it's possible/feasible to implement. I apologize if this is considered an overly 'broad' question, but I think SO would be the best place to ask this. Let us suppose I have a website and I want to display a graph to an end-user. For the purposes...
David542
1

votes
2

answer
171

Views

Can someone help me find the bug in my IBM speech to text code/

I am using websockets to send request to IBM's speech to text api, and I am getting a constant pipe break error. The documentation for IBM speech to text api says it can take up 4mb in frames, but I can only give it seventy kb without it breaking. https://www.ibm.com/watson/developercloud/doc/speech...
maha
1

votes
2

answer
2.4k

Views

Windows 7 Websocket PlatformNotSupportedException

I am working on an application using the Microsoft.Azure.Devices.Client NuGet package. Everything is running great on Windows 10, but when testing on a Win7 machine I get this aggregate exception. System.PlatformNotSupportedException: The WebSocket protocol is not supported on this platform. Search...
S. Flynn
1

votes
2

answer
737

Views

Exposing metrics about current Websocket connections with Spring

For my dashboarding application I want to monitor my Spring Boot based application with internal Spring metrics. Therefor I am using the spring-boot-actuator dependency which is exposing a lot of internal metrics. There are a lot of HTTP based metrics and Tomcat metrics like current sessions, amount...
rieckpil
1

votes
2

answer
65

Views

Golang timeout or return early

I'm attempting to build a realtime multiplayer game server in Golang using websockets as a learning project, and I'm having difficulty understanding how exactly I'm supposed to implement this concept: All of the users in a game room are given a duration, MAX_TIMEOUT to respond to a prompt provided....
Quontas
1

votes
1

answer
42

Views

Not able to start hivemq server on a remote server?

I have made two servers one is dummy test server and other is where my django project is running. I am able to run hivemq server on my dummy server but it is throwing a error while i try to run it on my project server. java.lang.ExceptionInInitializerError: null at org.jgroups.logging.LogFactory.get...
MrSoloDolo
0

votes
0

answer
12

Views

Error connecting to node server with socket

I have a node server running with socket.io implemented by someone else var milo_socket_io = io .of('/milo') .on('connection', function(socket) { console.log('Client connected ' + socket.id); clients.push(socket); }); function sendLiveData(jsonStr) { switch (jsonStr.deviceType) { case 'milo' : milo_...
Chinni
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

View additional questions