Hello,
I have a RO client that list with ZeoConf all servers available.
I have 2 RO servers available, one with Port 8095 and the other on Port 8096.
I use the same ROChannel, ROMessage, RORemosteService to connect on each Server.
I use this procedure :
Function TClientForm.CanUseServer(Server_URL: String): Boolean;
Var
OldURi, lUri: TROUri;
Begin
OldURi := TROUri.Create;
lUri := TROUri.Create;
Try
OldURi.Assign(ROChannel.TargetUri);
Try
lUri.URI := Server_URL;
fCurrentTargetUri.Assign(lUri);
ROChannel.TargetUri := fCurrentTargetUri;
RORemoteService.Channel := ROChannel;
result := (RORemoteService As IChorus_Service).Can_Connect_To_Server(Server_Password);
Except
On E: Exception Do
cbTargetUrl.Font.Color := clRed;
End;
Finally
If lUri <> Nil Then
FreeAndNil(lUri);
fCurrentTargetUri.Assign(OldURi);
ROChannel.TargetUri := fCurrentTargetUri;
If OldURi <> Nil Then
FreeAndNil(OldURi);
End;
End;
In twi different cases the server_URL parameter passed to the function are different but the it is alway the same server that receive the request, it’s like if the Port isn’t taken in account.
Any Idea ?
Best regards
Armindo