How to send custom payload in WebSocket handshake request?
up vote
0
down vote
favorite
Context
I have a lot of "agents" (an agent is a computer running an AI in the middle of a city). I'm building a common server to connect all agents. My idea is: when a new agent is put on place, the agent try to connect to the server using WebSocket with a custom payload in the handshake request containing all the agent properties (like its UUID, geolocation, etc). So, if these properties are not valid, the connection is refused immediatly.
The Problem
How to send a custom payload in the WebSocket http request and how to intercept this payload using Spring Framework? Is this even a good approach?
spring sockets spring-boot websocket spring-websocket
add a comment |
up vote
0
down vote
favorite
Context
I have a lot of "agents" (an agent is a computer running an AI in the middle of a city). I'm building a common server to connect all agents. My idea is: when a new agent is put on place, the agent try to connect to the server using WebSocket with a custom payload in the handshake request containing all the agent properties (like its UUID, geolocation, etc). So, if these properties are not valid, the connection is refused immediatly.
The Problem
How to send a custom payload in the WebSocket http request and how to intercept this payload using Spring Framework? Is this even a good approach?
spring sockets spring-boot websocket spring-websocket
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Context
I have a lot of "agents" (an agent is a computer running an AI in the middle of a city). I'm building a common server to connect all agents. My idea is: when a new agent is put on place, the agent try to connect to the server using WebSocket with a custom payload in the handshake request containing all the agent properties (like its UUID, geolocation, etc). So, if these properties are not valid, the connection is refused immediatly.
The Problem
How to send a custom payload in the WebSocket http request and how to intercept this payload using Spring Framework? Is this even a good approach?
spring sockets spring-boot websocket spring-websocket
Context
I have a lot of "agents" (an agent is a computer running an AI in the middle of a city). I'm building a common server to connect all agents. My idea is: when a new agent is put on place, the agent try to connect to the server using WebSocket with a custom payload in the handshake request containing all the agent properties (like its UUID, geolocation, etc). So, if these properties are not valid, the connection is refused immediatly.
The Problem
How to send a custom payload in the WebSocket http request and how to intercept this payload using Spring Framework? Is this even a good approach?
spring sockets spring-boot websocket spring-websocket
spring sockets spring-boot websocket spring-websocket
asked Nov 8 at 13:20
Hugo Sartori
928
928
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53208615%2fhow-to-send-custom-payload-in-websocket-handshake-request%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown