Skip to content
Permalink
Browse files

big refactoring to move code from SynCommons to SynTable

- to keep file size reasonnable
  • Loading branch information...
Arnaud Bouchez
Arnaud Bouchez committed May 10, 2019
1 parent efa5a8e commit 1537e779676631e13afd9f70a787aff47cf8a272
@@ -71,6 +71,7 @@ interface
Classes,
Variants,
SynCommons,
SynTable,
SynLog,
SynCrypto,
SynEcc,
@@ -69,6 +69,7 @@ interface
SysUtils,
Classes,
SynCommons,
SynTable,
SynLog,
SynCrypto,
mORMot,
@@ -52,6 +52,7 @@ interface
SysUtils,
Classes,
SynCommons,
SynTable,
SynEcc,
SynCrypto;

@@ -163,6 +163,7 @@ interface
{$endif}
SynCrypto, // for hcSynShaAes
SynCommons,
SynTable,
SynLog,
mORMot;

@@ -86,29 +86,42 @@ interface
{$I Synopse.inc} // define HASINLINE USETYPEINFO CPU32 CPU64

uses
{$IFDEF FPC}
//LCLProc, LCLIntf, LCLType,
LCLType, LCLIntf,
{$ENDIF}
{$IFDEF MSWINDOWS}
Windows, CommCtrl,
{$ENDIF}
{$ifdef FPC}
LResources,
{$else}
Consts, PsAPI,
{$ifdef MSWINDOWS}
Windows,
CommCtrl,
{$endif}
Messages, SysUtils, Classes, Graphics,
Controls, Forms, StdCtrls, ExtCtrls, Buttons,
{$ifdef USETMSPACK}
AdvGlowButton, TaskDialog, TaskDialogEx, AdvToolBarStylers, AdvToolBar,
{$endif USETMSPACK}
{$ifdef FPC}
SynTaskDialog in '.\Samples\ThirdPartyDemos\Ondrej\SynTaskDialog4Lazarus\SynTaskDialog.pas',
//LCLProc, LCLIntf, LCLType,
LCLType,
LCLIntf,
LResources,
SynTaskDialog in '.\Samples\ThirdPartyDemos\Ondrej\SynTaskDialog4Lazarus\SynTaskDialog.pas',
{$else}
SynTaskDialog,
{$endif}
SynGdiPlus, SynCommons, mORMot, mORMotUI;
Consts,
PsAPI,
SynTaskDialog,
{$endif FPC}
Messages,
SysUtils,
Classes,
Graphics,
Controls,
Forms,
StdCtrls,
ExtCtrls,
Buttons,
{$ifdef USETMSPACK}
AdvGlowButton,
TaskDialog,
TaskDialogEx,
AdvToolBarStylers,
AdvToolBar,
{$endif USETMSPACK}
SynGdiPlus,
SynCommons,
SynTable,
mORMot,
mORMotUI;

type
/// Form used to Log User and enter its password
@@ -2580,7 +2580,7 @@ function TWebCrtSocketProcess.GetFrame(out Frame: TWebSocketFrame;
fSocket.SockInRead(@hdr.len32,8,false);
if hdr.len32<>0 then // size is more than 32 bits -> reject
hdr.len32 := maxInt else
hdr.len32 := bswap32(hdr.len64);
hdr.len32 := {$ifdef FPC}SwapEndian{$else}bswap32{$endif}(hdr.len64);
if hdr.len32>WebSocketsMaxFrameMB shl 20 then
raise EWebSockets.CreateUTF8('%.GetFrame: length should be < % MB',
[self,WebSocketsMaxFrameMB]);
@@ -2676,7 +2676,7 @@ function TWebCrtSocketProcess.SendFrame(var Frame: TWebSocketFrame): boolean;
fSocket.SockSend(@hdr,4);
end else begin
hdr.len8 := FRAME_LEN8BYTES or fMaskSentFrames;
hdr.len64 := bswap32(len);
hdr.len64 := {$ifdef FPC}SwapEndian{$else}bswap32{$endif}(len);
hdr.len32 := 0;
// huge payload sent outside TCrtSock buffers
if not fSocket.TrySndLow(@hdr,10+fMaskSentFrames shr 5) or
Oops, something went wrong.

0 comments on commit 1537e77

Please sign in to comment.
You can’t perform that action at this time.