#1 2018-12-01 12:43:16

ertank
Member
Registered: 2016-03-16
Posts: 168

Delphi-Android to access mORMot server

Hello,

I have a server that I use for interface based access. My windows VCL project connects to the server as below:

  Client := TSQLHttpClientWebsockets.Create(SERVER, PORT_NAME, Model);
  TSQLHttpClientWebsockets(Client).WebSocketsUpgrade('BF67CA3DCE1B473ABC568A25BD41DA7A');  // real value is different

I have looked at examples for Cross Platform. I could not see how I can connect my above server. TSQLHttpClientWebsockets seems not defined in CrossPlatform units. If I include mORMotHttpClient unit that leads to compilation error in SynZip.pas file.

It is possible I missed something. I just do not know what it is.

I appreciate any help.

Thanks.

Offline

#2 2018-12-01 21:02:35

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

Re: Delphi-Android to access mORMot server

WebSockets are not supported yet for cross-platform clients. But WebSockets are not mobile friendly, due to potential disconnections in 3G/4G.

The fallback process is to make the mobile client application pull the server (e.g. every second) - pulling is not inefficient, and it also ensure that the connection is there, and allow easy change of TCP connection (e.g. when the mobile changes its IP address, which is quite often).

Offline

#3 2018-12-02 09:06:40

ertank
Member
Registered: 2016-03-16
Posts: 168

Re: Delphi-Android to access mORMot server

I checked examples. They handle json file as a table.

I suppose I will "pull" from srver json, save it in a file and process?

I could not see how I can make a "pull" from such a server of mine. Is there any such examples for FMX platform?

Offline

Board footer

Powered by FluxBB