Picture of Wim 4127
Registered 6 years 252 days
Wim 4127 Tuesday, 21 December 2021, 11:55 AM
websocket client crashes when no DNS is provided
When you create a IAppWebSocketClient instance and you do not provide an IDns (set it to nullptr), the websocket client crashes when using a hostname to connect to. We wanted to verify whether this is intended behavior, because we have the impression that if you do this with the http_client class, it works without providing a IDns pointer with hostnames or without hostnames. Is it possible that the clients behave differently? Or what is the reason then that it worked with HTTP client?
Picture of Daniel Deterding (innovaphone)
Moderator Registered 15 years 121 days
Daniel Deterding (innovaphone) Thursday, 23 December 2021, 07:37 AM
Re: websocket client crashes when no DNS is provided
Hi Wim,

the websocketclient was created at another time than the httpclient and the IDns parameter was added later to the httpclient so that there must be just one IDns instance within one app instance.

You'll notice, that the IDns parameter is an optional argument in the IHTTPClient::Create function and thus doesn't need to be provided (null is ok and the httpclient will create an IDns instance itself).

It is no optional parameter for the websocketclient though so it's ok that this one crashes.

Greetings,
Daniel
Picture of Wim 4127
Registered 6 years 252 days
Wim 4127 Thursday, 23 December 2021, 08:05 AM
Re: websocket client crashes when no DNS is provided
Ok, it explains the behavior we see in the app, but I don't think we need to start a discussion on that it's ok it crashes... you guys apply some strange logic big grin
← You can define your color theme preference here