#1 2018-04-16 10:44:56

EgorovAlex
Member
Registered: 2015-02-18
Posts: 43

CrossPlatform Services

Hello,

This is possible and how to use services on Delphi FMX mobile platform?

Offline

#2 2018-04-16 11:21:48

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

Re: CrossPlatform Services

Yes, you can create clients which work with FMX.

See https://synopse.info/files/html/Synopse … DE_TITL_86

Offline

#3 2018-04-18 13:25:26

EgorovAlex
Member
Registered: 2015-02-18
Posts: 43

Re: CrossPlatform Services

Thank you for quick answer!

But can you explain also how I can rewrite my windows part of code for cross-platform?
What I should use instead TSQLHttpClientWebsockets and how to use NPM_KEY with connection

  HttpClient := TSQLHttpClientWebsockets.Create(AnsiString(Computer.Value), AnsiString(sPort), TSQLModel.Create([]));
  HttpClient.Model.Owner := HttpClient;
  HttpClient.WebSocketsUpgrade(NPM_KEY);
  if HttpClient.ServerTimeStampSynchronize then begin
    HttpClient.ServiceDefine([IMsgService], sicShared);
    HttpClient.Services.Resolve(IMsgService, MsgSvc);
  end;
  ...
  MsgSvc := nil;
  if Assigned(HttpClient) then
    FreeAndNil(HttpClient);

Last edited by EgorovAlex (2018-04-18 13:32:05)

Offline

#4 2018-04-18 15:08:37

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

Re: CrossPlatform Services

WebSockets are not yet supported by the cross-platform units (and code generation).

Offline

#5 2018-04-18 18:03:45

EgorovAlex
Member
Registered: 2015-02-18
Posts: 43

Re: CrossPlatform Services

Any way to use another connection type but with encryption?

Offline

#6 2018-04-18 20:32:35

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

Re: CrossPlatform Services

Yes, of course HTTPS do work without any problem.

Offline

Board footer

Powered by FluxBB