Picture of mitop
Registered 3 years 291 days
mitop Tuesday, 28 June 2022, 05:41 PM
Calling httplisten different ways on different sr versions
Hi all,

the last initialization steps of an app are the httplisten functions of the webserver. If we create a new app instance from Visual Studio Plugin the lines look like this:
...
# webserverPlugin->HttpListen(nullptr, nullptr, nullptr, nullptr, _BUILD_STRING_);
# webserverPlugin->WebsocketListen();
...

In the replicator tutorial it is mentioned to call:
...
# webserverPlugin->HttpListen(0, 0, 0, 0, _BUILD_STRING_);
# webserverPlugin->WebsocketListen();
...

Is there any difference calling the httplisten function with "nullptr" or "0"?


Why do I ask this questions?
- We have two apps, both using the replicator. One is using the "webserverPlugin->HttpListen(0, 0, 0, 0, _BUILD_STRING_);" function the other uses the "webserverPlugin->HttpListen(nullptr, nullptr, nullptr, nullptr, _BUILD_STRING_);" function
-- Both Apps work in our test environment, a 13r2 sr12 with a couple of users

-- Running the "webserverPlugin->HttpListen(0, 0, 0, 0, _BUILD_STRING_);" app on a 13r3 Beta 1 with ~2000 users is no problem

-- Running the "webserverPlugin->HttpListen(nullptr, nullptr, nullptr, nullptr, _BUILD_STRING_);" app on a 13r3 Beta 1 with ~2000 users results in these erros:
--- WebserverPlugin(025b0420,025b0080 (default user))::HttpListen(): path to listen = '(null)', staticFilePrefix = '132002'
--- WebserverPlugin(025b0420,025b0080 (default user))::WebsocketListen(): path to listen = '(null)'

These lines seems to be the only difference between the two apps. Which is why I wonder if there is a difference between calling httplisten function with "nullptr" and "0".


Best regards
Mladen
Picture of mitop
Registered 3 years 291 days
mitop Friday, 1 July 2022, 09:08 AM
Re: Calling httplisten different ways on different sr versions
Hi again,

It seems that there is no difference, at least in our case.

Thanks anyway and best regards
Mladen
← You can define your color theme preference here