You are not logged in.
I modified slightly the Sample 27 - SMS cross platform client to use it in a reverse proxy nginx setup. It works only when the server address parameter of the GetClient method contains a specific address (either 127.0.0.1 or my local ip). Is there any way to pass a generic value to use the host ip address, whatever it is? I tried both the empty string and '/' without success.
By the way in the Smart Mobile Studio project, the assignment of Client to nil and the if check at the first line of the TForm1.BtnConnectClick event handler, doesn't seem to work:
if Client=nil then
...
else begin
...
Client.Free;
Client := nil;
end;
A second press on the 'Server Connect' button produces nothing because the Client object hasn't become nil. A raw and clumsy solution like the following, does the work properly:
if BtnConnect.Caption='Server Connect' then
...
BtnConnect.Caption := 'Disconnect';
...
else begin
...
BtnConnect.Caption := 'Server Connect';
...
end;
Offline
I found a solution by passing window.location.hostname. Sorry for my rather silly question.
Offline