There are a few issues, yes.
I have tried and tried various approaches to achieve a connection and not get the SIGSEGV-error.
In the end, I installed a Chrome Addon with Direct Web Sockets Functionality:
https://chrome.google.com/webstore/detail/smart-websocket-client/omalebghpgejjiaoknljcfmglgbpocdp/relatedThis to test the address that I try to use via Lazarus.
-
First things first.
The Chrome Addon, with the address:
wss://stream.binance.com:9443/ws/btcusdt@ticker
connects very well and instantly starts receiving the tickers in JSON-format
{
"e": "24hrTicker",
"E": 1615268894603,
"s": "BTCUSDT",
"p": "3394.80000000",
"P": "6.697",
"w": "51548.22027742",
"x": "50688.12000000", ... and so on ...
–
However.
When I try to do the same with your WebSocket-implementation, I cannot get it to work.
MyClient := TWebsocketClient.Create('wss://stream.binance.com',9443,'/ws/btcusdt@ticker');
does not produce an error, but the next step:
MyCommunicator := MyClient.Connect(TSSLSocketHandler.GetDefaultHandler);
gives a Debugger Exception Notification: Project xxx raised exception class 'ESocketError' with message: Host name resolution for "wss://stream.binance.com" failed.
It basically failes at line 74: ASocket.Connect; in the WebsocketsClient-file
-
I have performed a nslookup from a command window:
nslookup wss://stream.binance.com
and the answer is 52.198.117.1 and 54.65.212.75
-This is the exact same address as ASocket.Connect cannot resolve.
–
Unfortunately, from there and on, I am in deep waters,
–
More things I have tried.
Deactivated my AntiVirus.
Deactivated Windows Firewall.
Neither of which changes the outcome.