We use cookies and other tracking technologies to improve your browsing experience on our website, to show you personalized content and targeted ads, to analyze our website traffic, and to understand where our visitors are coming from.
I'm using WAMP to communicate with 3rd party server.
We are currently using TsgcWebSocketClient and TsgcWSPClient_WAMP version 3.4 with Delphi 10 Seattle. Server is using JWAMP/Jetty.
When updating SGC websocket to version 2022.5.0 and Delphi 11, connection is no longer working.
Debugger raises exception: "Project xxx.exe raised exception class TsgcWSException with message 'Protocol not supported .'.'"
Any idea what could be the reason?
Log of connection attempt for both versions:
---------------------------------------------------------------
Delphi 11 and websockets 2022.5.0
---------------------------------------------------------------
Stat Connected.
Sent 01/12/2022 15.38.31: GET /ccinfo/ HTTP/1.1
Host: 10.0.1.151:8554
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Key: x/lyhzZmwQJfiWrMvE6N6w==
Origin: 10.0.1.151
Sec-WebSocket-Protocol: WAMP
Sec-WebSocket-Version: 13
In the old version, if the client request a protocol and the server doesn't support this protocol, the connection was not closed. This was fixed some time ago, if the client sends a protocol and the server doesn't accept this protocol in the header "Sec-WebSocket-Protocol" the connection is closed.
If you check the log, you will see that the client sends the following header in the request:
Sec-WebSocket-Protocol: WAMP
While the server, although accept the connection, it doesn't sends this protocol in the response, so this means the server doesn't support the protocol.