You are not logged in.
Pages: 1
Ive just started with mormot and after a lot of reading, it feels like a great piece of software.
What I'm trying is a variation of some of the samples in the documentation. If I let the program run without delay (ie no breakpoints) it works as expected, but if I go to the debugger on code like the following on the client
procedure TForm12.Test;
Var
ans: Integer;
begin
ans := 0;
GModel := TSqlModel.Create([], ROOT_NAME);
// GClient := TSQLHttpClientWinSock.Create('127.0.0.1','888',GModel);
GClient := TSQLHttpClientWebSockets.Create('127.0.0.1','888',GModel,100000,100000,100000);
GClient.WebSocketsUpgrade('super secret');
GClient.ServiceDefine([ICalculator], sicShared);
if GClient.Services['Calculator'].Get(I) then
Begin
ans := I.Add(3,4);
End;
Memo1.Lines.Add(IntToStr(ans));
I := Nil;
GClient.Free;
GModel.Free;
end;
if I step up to the line that reads "ans := I.Add(3,4);" if theres more than about a 5 seconds delay I get an exception "ECrtSocket with message 'SndLow 10053 WSAECONNABORTED [An established connection was aborted by the software in your host machine]"
As you can see from the example above I have a large value in the timeouts, but I suspect its the server side dropping the connection based on the exception. I can put the line in a loop of 10000 and it runs fine outside of the debugger.
Is there some type of lifetime for the connection on the server that I havent found yet ?
The relevent part of the server code is
SqLite3 := TSQLite3LibraryDynamic.Create;
GModel := TSQLModel.Create([], ROOT_NAME);
GServer := TSQLRestServerDb.Create(GModel);
GServer.ServiceDefine(TServiceCalculator, [ICalculator], sicShared);
GHTTPServer := TSQLHttpServer.Create(PORT_NAME, [GServer], '+', useHttpApiRegisteringURI);
GHTTPServer.AccessControlAllowOrigin := '*';
but I couldnt find anything obvious where a connection or idle timeout could be set.
Is there a limit and is it possible to set this limit ?
Offline
How do I determine the version ? The files mention 1.18 but no release number. It was downloaded yesterday from the github mirror.
Offline
You can find the current version number in the file "SynopseCommit.inc".
Offline
Ok, version in SynopseCommit.inc is 1.18.4643
Offline
Pages: 1