#1 2017-12-20 03:57:12

htits
Member
Registered: 2014-12-27
Posts: 10

How add the remote server to a TSQLHttpServer in runtime?

Should I add a remote server to a TSQLHttpServer  in runtime?  Is it easy to add a TSQLRestServer to TSQLHttpServer or add new service  to TSQLRestServer by ServiceDefine? If I define a TSQLRestServer on BPL or DLL, It can Add to TSQLHttpServer( in exe)  in runtime?

Offline

#2 2017-12-20 09:00:16

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,660
Website

Re: How add the remote server to a TSQLHttpServer in runtime?

Good question.
You could call TSQLHttpServer.AddServer but the method was not thread-safe so there may have been a problem if a request comes at that very exact time.

I've now ensured that TSQLHttpServer.AddServer/RemoveServer are thread-safe.
See https://synopse.info/fossil/info/c46139b2f7
You could now add/remove TSQLRestServer instances safely at runtime.

BTW, don't use packages for your plugins.
Regular dll are just fine, and don't suffer from problems when you unload them.

Offline

#3 2017-12-20 12:10:38

htits
Member
Registered: 2014-12-27
Posts: 10

Re: How add the remote server to a TSQLHttpServer in runtime?

Thank's AB!

Offline

Board footer

Powered by FluxBB