Hi
I have a server application which already has a TRoIndyHttpServer with several methods, etc and this is working fine.
I would like to put a new server component (another TRoIndyHttpServer) to this application in order to implement a “admin” interface listening to another port. I know how to do that.
The problem is defining some methods that only this server would respond to.
I didn’t find any way to create a link from the service unit to just this specific server.
I’ve created this TRoRemoteDataModule:
unit Admin_Impl;
{$I RemObjects.inc}
interface
uses
System.SysUtils, System.Classes, System.TypInfo,
uROXMLIntf, uROClientIntf, uROClasses, uROTypes, uROServer, uROServerIntf, uROSessions,
uRORemoteDataModule, uRORTTIAttributes, uRORTTIServerSupport, uROArray, roTypes;
const
__ServiceName ='admin';
type
[ROService(__ServiceName)]
TAdmin = class(TRORemoteDataModule)
public
// admin methods
[ROServiceMethod]
function someMethod(): string;
end;
...
initialization
RegisterCodeFirstService(TAdmin);
end.
What I’ve found so far is that this method (someMethod) could be executed my all the servers in this project.
Is there a way in which I could link this “interface” TAdmin with the new server component in order to allow just the clients querying at its port to run this methods?