-
Notifications
You must be signed in to change notification settings - Fork 751
Description
Page link: websockets
Document link: websockets-in-runtime.md
My Issue
In some communication protocol, which is based on WebSocket, we need to read and write the opening handshake header. In Java we can do this with modifyHandshake
public void modifyHandshake(ServerEndpointConfig sec, HandshakeRequest request, HandshakeResponse response)
For example there is a communication protocol, where there is different versions, and the client writes in the header, what versions they are accept. So we need to read it form the header, for example (MyProtocolVersion : 3.4, 4.5 ), and respond (MyProtocolVersion : 3.4) or (MyProtocolVersion : 4.5)
In the future is it possible that we will have access to it?
My suggestion:
Mendix will still handle the headers, except the "Other headers", so we can read it and do something in Java then write the "Other headers", and based on the value, say no to the client, so no websocket connection will made. And I also want to read the URI during the handshake, because in the protocol that I want to implement, the clients put his ID after the "ws://.../my-endpoint" like this ws://.../my-endpoint/ClientID