Skip to content

Commit e5d2b1b

Browse files
committed
- Ajuste de versionamento
+ Exportação de propriedades para ajuste fino de limites no Indy, FpHttp e Sagui - Correção de nomenclatura de arquivo de strings pt-br
1 parent a92c074 commit e5d2b1b

6 files changed

Lines changed: 83 additions & 26 deletions

File tree

src/base/RALConsts.pas

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ interface
1313

1414
const
1515
// Versionamento
16-
RALVERSION = '0.11.0-9 alpha';
16+
RALVERSION = '0.11.0-11 alpha';
1717
RALVERSION_MAJOR = 0;
1818
RALVERSION_MINOR = 11;
1919
RALVERSION_PATCH = 0;
@@ -69,7 +69,7 @@ interface
6969

7070
resourcestring
7171
{$IF DEFINED(LANG_PTBR)}
72-
{$I ralconsts_prbr.inc}
72+
{$I ralconsts_ptbr.inc}
7373
{$ELSEIF DEFINED(LANG_ESES)}
7474
{$I ralconsts_eses.inc}
7575
{$ELSE}

src/base/ralconsts_eses.inc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11

22
{ @abstract constant internal messages
3-
am = alert messages
4-
em = error messages
5-
wm = warning messages
3+
am = alert messages: middle severity messages, might raise exception
4+
em = error messages: high severity messages, raises exception
5+
wm = warning messages: low severity messages, doesn't raise exception
6+
cm = common messages: usually used in descriptions or labels
67
these are strings that are present through the internal code of RAL, stored here
78
for localization purposes, allowing the user to customise their side of the component
89
Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,23 @@
1010
Do NOT replace wildcards starting with '%' or your package will throw errors
1111
}
1212
// general error messages
13-
emCompressInvalidFormat = 'Formato de compressão inválido.';
14-
emCompressLibFilesError = 'Os arquivos binários das seguintes classes não foram encontrados: %s.';
15-
emContentCheckError = 'Erro de verificação de conteúdo.';
16-
emCryptEmptyKey = 'A chave deve ser fornecida.';
17-
emDBConnectionUndefined = 'Conexão não definida.';
18-
emDBDriverMissing = 'Driver de conexão não encontrado.';
19-
emDBEmptyBody = 'O "body" está vazio.';
20-
emDBLinkMissing = 'Propriedade DBLink ausente.';
21-
emDBUpdateSQLMissing = 'SQL para UpdateTable/UpdateSQL não pode estar vazio.';
22-
emInvalidFormat = 'Formato Inválido.';
23-
emInvalidJSONFormat = 'Formato JSON inválido.';
24-
emQueryVersionError = 'Versão de estrutura inválida.';
25-
emRouteAlreadyExists = 'A rota já existe.';
26-
emStorageClassNotFound = 'Classe do Storage não encontrada.';
27-
emStorageInvalidBinary = 'Formato binário inválido.';
28-
emStorageLinkNotFound = 'Storage %s não está declarado em "uses".';
29-
emStorageNotFound = 'Nenhum TRALStorageLink encontrado.';
13+
emCompressInvalidFormat = 'Formato de compressão inválido.';
14+
emCompressLibFilesError = 'Os arquivos binários das seguintes classes não foram encontrados: %s.';
15+
emContentCheckError = 'Erro de verificação de conteúdo.';
16+
emCryptEmptyKey = 'A chave deve ser fornecida.';
17+
emDBConnectionUndefined = 'Conexão não definida.';
18+
emDBDriverMissing = 'Driver de conexão não encontrado.';
19+
emDBEmptyBody = 'O "body" está vazio.';
20+
emDBLinkMissing = 'Propriedade DBLink ausente.';
21+
emDBUpdateSQLMissing = 'SQL para UpdateTable/UpdateSQL não pode estar vazio.';
22+
emInvalidFormat = 'Formato Inválido.';
23+
emInvalidJSONFormat = 'Formato JSON inválido.';
24+
emQueryVersionError = 'Versão de estrutura inválida.';
25+
emRouteAlreadyExists = 'A rota já existe.';
26+
emStorageClassNotFound = 'Classe do Storage não encontrada.';
27+
emStorageInvalidBinary = 'Formato binário inválido.';
28+
emStorageLinkNotFound = 'Storage %s não está declarado em "uses".';
29+
emStorageNotFound = 'Nenhum TRALStorageLink encontrado.';
3030
3131
// sagui error messages
3232
emSaguiLibraryLoadError = 'Erro ao tentar carregar libsagui.';

src/engine/fpHTTP/RALfpHTTPServer.pas

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ TRALfpHttpServerThread = class(TThread)
7575
property Active: boolean read GetActive write SetActive;
7676
property Port: IntegerRAL read GetPort write SetPort;
7777
property SessionTimeout: IntegerRAL read GetSessionTimeout write SetSessionTimeout;
78-
property QueueSize : IntegerRAL read GetQueueSize write SetQueueSize;
78+
property QueueSize: IntegerRAL read GetQueueSize write SetQueueSize;
7979
end;
8080

8181
TRALfpHttpServer = class(TRALServer)
@@ -413,7 +413,7 @@ constructor TRALfpHttpServerThread.Create(AOwner: TRALfpHttpServer);
413413
FreeOnTerminate := False;
414414

415415
FHttp := TFPHttpServer.Create(AOwner);
416-
FHttp.QueueSize := 15;
416+
QueueSize := -1;
417417
FHttp.Threaded := True;
418418
FHttp.OnRequest := @OnCommandProcess;
419419

src/engine/indy/RALIndyServer.pas

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ TRALIndyServer = class(TRALServer)
3636
private
3737
FHttp: TIdHTTPServer;
3838
FHandlerSSL: TIdServerIOHandlerSSLOpenSSL;
39+
FMaxConnections: IntegerRAL;
40+
FListenQueue: IntegerRAL;
41+
procedure SetListenQueue(const Value: IntegerRAL);
42+
procedure SetMaxConnections(const Value: IntegerRAL);
3943
protected
4044
function CreateRALSSL: TRALSSL; override;
4145
function IPv6IsImplemented: Boolean; override;
@@ -55,6 +59,8 @@ TRALIndyServer = class(TRALServer)
5559
constructor Create(AOwner: TComponent); override;
5660
destructor Destroy; override;
5761
published
62+
property ListenQueue: IntegerRAL read FListenQueue write SetListenQueue;
63+
property MaxConnections: IntegerRAL read FMaxConnections write SetMaxConnections;
5864
property SSL: TRALIndySSL read GetSSL write SetSSL;
5965
end;
6066

@@ -70,6 +76,8 @@ constructor TRALIndyServer.Create(AOwner: TComponent);
7076
FHttp := TIdHTTPServer.Create(nil);
7177
FHttp.SessionState := False;
7278
FHttp.AutoStartSession := True;
79+
MaxConnections := -1;
80+
ListenQueue := -1;
7381
FHandlerSSL := TIdServerIOHandlerSSLOpenSSL.Create(nil);
7482

7583
{$IFDEF FPC}
@@ -333,6 +341,18 @@ procedure TRALIndyServer.SetActive(const AValue: Boolean);
333341
FHttp.Active := AValue;
334342
end;
335343

344+
procedure TRALIndyServer.SetListenQueue(const Value: IntegerRAL);
345+
begin
346+
FListenQueue := Value;
347+
FHttp.ListenQueue := Value;
348+
end;
349+
350+
procedure TRALIndyServer.SetMaxConnections(const Value: IntegerRAL);
351+
begin
352+
FMaxConnections := Value;
353+
FHttp.MaxConnections := Value;
354+
end;
355+
336356
procedure TRALIndyServer.SetSessionTimeout(const AValue: IntegerRAL);
337357
begin
338358
inherited;

src/engine/sagui/RALSaguiServer.pas

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ TRALSaguiServer = class(TRALServer)
4949
private
5050
FHandle: Psg_httpsrv;
5151
FLibPath: TFileName;
52-
52+
FPoolCount: IntegerRAL;
53+
FConnectionLimit: Int64RAL;
5354
class procedure DecodeAuth(AAuthorization: StringRAL; AResult: TRALRequest);
5455
class procedure DoClientConnectionCallback(Acls: Pcvoid; const Aclient: Pcvoid;
5556
Aclosed: Pcbool); cdecl; static;
@@ -60,6 +61,10 @@ TRALSaguiServer = class(TRALServer)
6061
Asize: csize_t): cssize_t; cdecl; static;
6162
class procedure DoStreamFree(Acls: Pcvoid); cdecl; static;
6263
class function GetSaguiIP(AReq: Psg_httpreq): StringRAL;
64+
procedure SetConnectionLimit(const Value: Int64RAL);
65+
procedure SetPoolCount(const Value: IntegerRAL);
66+
function GetPoolCount: IntegerRAL;
67+
function GetConnectionLimit: Int64RAL;
6368
protected
6469
function CreateRALSSL: TRALSSL; override;
6570
procedure CreateServerHandle;
@@ -78,7 +83,9 @@ TRALSaguiServer = class(TRALServer)
7883
constructor Create(AOwner: TComponent); override;
7984
destructor Destroy; override;
8085
published
86+
property ConnectionLimit: Int64RAL read GetConnectionLimit write SetConnectionLimit default 1000;
8187
property LibPath: TFileName read FLibPath write SetLibPath;
88+
property PoolCount: IntegerRAL read GetPoolCount write SetPoolCount default 32;
8289
property SSL: TRALSaguiSSL read GetSSL write SetSSL;
8390
end;
8491

@@ -186,6 +193,9 @@ constructor TRALSaguiServer.Create(AOwner: TComponent);
186193
{$ELSE}
187194
FLibPath := SgLib.GetLastName;
188195
{$ENDIF}
196+
197+
ConnectionLimit := -4;
198+
PoolCount := -1;
189199
end;
190200

191201
function TRALSaguiServer.CreateRALSSL: TRALSSL;
@@ -410,6 +420,16 @@ procedure TRALSaguiServer.FreeServerHandle;
410420
FHandle := nil;
411421
end;
412422

423+
function TRALSaguiServer.GetConnectionLimit: Int64RAL;
424+
begin
425+
Result := FConnectionLimit;
426+
end;
427+
428+
function TRALSaguiServer.GetPoolCount: IntegerRAL;
429+
begin
430+
Result := FPoolCount;
431+
end;
432+
413433
class function TRALSaguiServer.GetSaguiIP(AReq: Psg_httpreq): StringRAL;
414434
var
415435
vIP: array[0..45] of cchar;
@@ -456,7 +476,7 @@ function TRALSaguiServer.GetSSL: TRALSaguiSSL;
456476

457477
procedure TRALSaguiServer.SetActive(const AValue: boolean);
458478
var
459-
vActive : boolean;
479+
vActive: boolean;
460480
begin
461481
vActive := Active;
462482

@@ -481,6 +501,8 @@ procedure TRALSaguiServer.SetActive(const AValue: boolean);
481501
CreateServerHandle;
482502
if not InitializeServer then
483503
FreeServerHandle;
504+
SetConnectionLimit(ConnectionLimit);
505+
SetPoolCount(PoolCount);
484506
end
485507
else
486508
begin
@@ -489,6 +511,13 @@ procedure TRALSaguiServer.SetActive(const AValue: boolean);
489511
end;
490512
end;
491513

514+
procedure TRALSaguiServer.SetConnectionLimit(const Value: Int64RAL);
515+
begin
516+
FConnectionLimit := Value;
517+
if FHandle <> nil then
518+
sg_httpsrv_set_con_limit(FHandle, Value);
519+
end;
520+
492521
procedure TRALSaguiServer.SetLibPath(const AValue: TFileName);
493522
begin
494523
if AValue = FLibPath then
@@ -514,6 +543,13 @@ procedure TRALSaguiServer.ShutdownServerHandle;
514543
sg_httpsrv_shutdown(FHandle);
515544
end;
516545

546+
procedure TRALSaguiServer.SetPoolCount(const Value: IntegerRAL);
547+
begin
548+
FPoolCount := Value;
549+
if FHandle <> nil then
550+
sg_httpsrv_set_thr_pool_size(FHandle, Value);
551+
end;
552+
517553
procedure TRALSaguiServer.SetPort(const AValue: IntegerRAL);
518554
var
519555
vActive: boolean;

0 commit comments

Comments
 (0)