528 questions
2
votes
0
answers
101
views
Java web-socket ssl certificate error while cert is valid
Hello I've been facing a weird problem the past few days.
I send out a demo of my app to a few people. however for around 75% of the people the demo didn't work, while for the other 25% it works great....
0
votes
0
answers
76
views
Spring API Gateway configuration for reactive and non-reactive web sockets
I'm working on a WebSocket proxy microservice in Java, built using the org.java_websocket.* library. It connects to a remote server that streams VNC data. The goal is to allow clients—like noVNC—to ...
0
votes
1
answer
148
views
Quarkus WebSockets Next Intercepting HTTP GET Requests when using the @WebSocket annotation
After moving from quarkus-websocket to quarkus-websockets-next, any HTTP GET to a @WebSocket path now errors with
"Connection" header must be "Upgrade"
This is because the new ...
0
votes
1
answer
239
views
Cannot connect to Jetty WebSocket v11
I am trying to implement server, as java plain application, where clients could connect to a web socket.
The goal is to connect client to a websocket via this url: ws://localhost:4550/api/myWebSocket
,...
1
vote
1
answer
131
views
Java 21 websocket message not received
Why this code does not receive any message:
public class MainClass {
public static void main(String[] args) throws Exception {
CountDownLatch latch = new CountDownLatch(1);
try (...
0
votes
0
answers
17
views
How to implement onFragmented that is sent from server websocket java? (org.java_websocket.Websocket)
source: https://javadoc.io/static/org.java-websocket/Java-WebSocket/1.5.7/org/java_websocket/client/WebSocketClient.html#sendFragmentedFrame(org.java_websocket.enums.Opcode,java.nio.ByteBuffer,boolean)...
2
votes
1
answer
285
views
Can't establish connection between STOMPjs and Java Websocket using STOMP protocol
I followed this Spring Boot tutorial on Websockets implementing STOMP protocol which works perfectly on its own. I wanted to connect it to a frontend app which uses Expo so I am using STOMPjs
After ...
0
votes
0
answers
138
views
Implementing a simple websocket client in spring boot listening to 2 different websocket endpoints - but they always start executing together
I have 2 websocket endpoints producing related messages:
"ws://localhost:8032/posts"
"ws://localhost:8032/comments"
Comments are guaranteed to be published after a referred post ...
1
vote
1
answer
96
views
How to deny preSend() in ChannelInterceptor based on custom check via DB call
Within my WebSocketConfig class:
@Configuration
@EnableWebSocketMessageBroker
class WebsocketConfig(<...>)
I override:
@Bean(name = ["csrfChannelInterceptor"])
fun ...
1
vote
1
answer
240
views
Quarkus Websocket Client Handshake 308 - Upgrade config?
I'm using Quarkus coming back at it, after some years and trying to configure for the first time a WS client, but I'm struggling to find a solution.
Related Dependencies in BoM version 3.7.1
io....
0
votes
1
answer
31
views
WebSocket ConvertAndSendUser failed to send message to specific user
I try to do a live-streaming bidding. So when the user wins the bid, he is the only person that will receive a message like "You won. An order has been placed."
@Override
public void ...
0
votes
1
answer
156
views
Android SocketIO EngineIOException: websocket error
I am trying to connect with the SocketIO, but I got this error from the Android side (iOS works):
Here is what I am doing in the Android:
override fun init() = callbackFlow {
val accessToken = ...
0
votes
0
answers
62
views
ServerEndpoint PostConstruct called twice
I am using JSR356 websockets in my web application and I am wondering why the ServerEndpoint PostConstruct method is called twice?!
This is the server.log of my WildFly server:
PushMessageEndpoint: -&...
0
votes
0
answers
316
views
How to correctly create a web socket connection client in Java?
I can't establish a correct connection to the topic. The server has a spring boot running and a web socket is configured in it:
@Configuration
@EnableWebSocketMessageBroker
public class ...
0
votes
1
answer
27
views
Does CometD support partial websocket messaging
I have application using CometD version 5 that does not support partial messages over websocket. Is it supported in newer version or else do i need to do it in my application. Any java libraries that ...
1
vote
0
answers
204
views
Why my socket connection is breaking after 2 mins after upgrading websocket-jetty-server from 9.4.48.v20220622 to 11.0.12?
websocket-jetty-server 11.0.12 socket connection is breaking after 2 mins
I am using websocket-jetty-server version 11.0.12 to use websocket.
I wanted to use the java verion 17 so I upgraded websocket-...
2
votes
1
answer
23
views
SOLVED: Why do the tiles display as 1 column rather than the desired grid?
Using Node and socket.io to make an image-key chatroom using an image keyboard of 11 x 11 image keys.
The tiles (image-key)s here are meant to display as an 11 x 11 grid.
They are instead displaying ...
1
vote
0
answers
191
views
SimpMessagingTemplate not sending messages
Here is my simple React component:
`import React, { useState, useEffect } from 'react';
function App() {const [price, setPrice] = useState(0);
useEffect(() => {const socket = new WebSocket("...
0
votes
0
answers
52
views
Java: How to replace doPost, doGet in deprecated WebSocketServlet class
In older Java versions you could extend a class with WebSocketServlet, and because WebSocketServlet itself extended HttpServlet it was possible to add CRUD method, such as doGet(...), doPost(...) etc ...
0
votes
1
answer
133
views
can TextWebSocketFrame be declared with static and final?
In Netty, send messages are like this:
channel.writeAndFlush(new TextWebSocketFrame("Operation Succeed"));
to run this code, nothing abnormal. so I think, argument from writeAndFlush can be ...
0
votes
1
answer
464
views
How to close/purge websocket connection from server side with Tomcat
I am using jakarta.websocket on Tomcat and I want my server after some time to close the websocket connection with a connected client. For that, I am calling session.close() which then triggers indeed
...
0
votes
1
answer
145
views
Java: How to send push notifications to a list of URLs?
Client Side
The client sends a POST call to the server to create a subscription.
The POST call request body contains the URL to which the server should send push notifications.
E.g. POST Request body:
...
1
vote
0
answers
1k
views
karate webSockets : getting invalid handshake response getStatus: 403 Forbidden
While writing karate feature test for websockets i am getting Invalid handshake response while the same endpoint is working when executed with postman.Here is karate feature test
Background:
* def ...
1
vote
1
answer
917
views
I have opened multiple websocket client data stream in jetty java with different api and secret calls , how do i close a particular session?
In my current code i had a servlet from which if i create post to the servlet it will open a new websocket client , that mean 10 client connection each running for same purpose but with different api ...
0
votes
0
answers
240
views
How to prevent websocket from closing - Java Endpoint
I'm trying to get input from users with HTML form and send a json object to my Endpoint instance. I use Jackson for deserialization and whenever an exception happens in the decoder (for example if ...