You are not logged in.
Pages: 1
Does the TSQLHttpClientWebsockets supports keep alive? I mean I want to know if my RestHttpServer is alive. Now I've implemented the extra thread for that but maybe I can use any built-in mechanism. I'm also not sure if I can use the TSQLHttpClientWebsockets requests from thread.
type
TPingThread = class(TThread)
private
Connector: TSQLHttpClientWebsockets;
event: TEvent;
procedure Ping;
protected
procedure Execute; override;
public
procedure Terminate;
constructor Create(AConnector: TSQLHttpClientWebsockets);
destructor Destroy; override;
end;
implementation
procedure TPingThread.Execute;
begin
inherited;
while not Terminated do
begin
if event.WaitFor(10000) = wrTimeout then
Ping
end;
end;
procedure TPingThread.Ping;
begin
if not Connector.ServerTimestampSynchronize then -> is Connector thread safe ?
PostMessage(Application.Handle, WM_QUIT, 0, 0);// Terminate;
end;
Offline
How can I change ping time?
Offline
Pages: 1