TROTransportChannel

I am converting some Delphi R.O. code to .Net and Oxygene.

Do you know what TROTransportChannel is equal to in .Net?
RemObjects.SDK.Channel is the closest thing I can find. Trying to implement TProgressEvent

Thanks!

The class you are looking for is called RemObjects.SDK.ClientChannel

Thank you very much! How about TROAESEncryptionEnvelope? What is the easiest way to find these associations? Some (or most) are very obvious but some are not so much. Also, TProgressEvent on the TROWinInetHTTPClient.

Thanks again!!

don’t use AES. Use SSL.

Hello

The component you are looking for is called AesEncryptionEnvelope. However there is a major security issue with the AES envelopes. While the AES encryption itsel is considered secure, all clients and server share the same password. This means that once this password is compromised then one can decypher any communications between clients and the server.

It would be better to switch to SSL instead. Remoting SDK supports TLS 1.2 which is considered as a very secure way of encrypting netweork communications.

Take a look at the OnTransferProgress event of the IpHttpClientChannel channel

Thanks Antonk! Much appreciated. :slight_smile:

One more question :slight_smile:

Can I do something like this in Oxygene to call a service method?

var loginSvc: RemObjects.SDK.RemoteService;

loginSvc := GetService(‘LoginService’); // Creates the service

if (loginSvc as ILoginService).ZentraLogin(user, psw, out person ) then begin…

Thanks!

The service proxy is instantiated differently in .NET:

var loginService := CoLoginService.&Create(message, clientChannel);
if loginService.Login(tbUserID.Text, tbPassword.Text) then begin ...

Take a look at this tutorial: https://docs.remotingsdk.com/Tutorials/ChatSample/

It uses C# but you can always use Oxidizer to convert C# code to Oxygene. Or I can recreate the code sample (both server and client apps) in Oxygene for your convenience.

very cool. It seems like it is working now for me. I did this…

var loginSvc: ILoginService;

loginSvc := CoLoginService.Create(ROMessage, ROChannel);
loginSvc.ZentraLogin(user, psw, out person);

I even used ROAESEncryptionEnvelope as part o the ROMessage (Which was needed).

I show that I am logged into our server with a new created user. Does this look like the right way to instantiate a method from a Service?

Thanks!

Yes, this is a correct way of calling the server.

1 Like