Changeset 237 for Network/CoolWeb/WebServer/UHTTPSessionMySQL.pas
- Timestamp:
- Apr 30, 2011, 10:54:24 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Network/CoolWeb/WebServer/UHTTPSessionMySQL.pas
r94 r237 12 12 { TFileHTTPSessionStorage } 13 13 14 { THTTPSessionStorageMySQL } 15 14 16 THTTPSessionStorageMySQL = class(THTTPSessionStorage) 15 17 private 18 FSessionIdCookieName: string; 19 FTimeout: Integer; 16 20 Lock: TCriticalSection; 17 21 function GetNewSessionId: string; 18 22 procedure GetSessionId(HandlerData: THTTPHandlerData); 19 23 public 20 Timeout: Integer; // in seconds21 24 SqlDatabase: TSqlDatabase; 22 SessionIdCookieName: string;23 25 Sessions: TStringList; 24 26 procedure Load(HandlerData: THTTPHandlerData); override; 25 27 procedure Save(HandlerData: THTTPHandlerData); override; 26 constructor Create ; override;28 constructor Create(AOwner: TComponent); override; 27 29 destructor Destroy; override; 30 published 31 property Timeout: Integer read FTimeout write FTimeout; // in seconds 32 property SessionIdCookieName: string read FSessionIdCookieName 33 write FSessionIdCookieName; 28 34 end; 29 35 36 procedure Register; 37 30 38 implementation 39 40 procedure Register; 41 begin 42 RegisterComponents('CoolWeb', [THTTPSessionStorageMySQL]); 43 end; 44 31 45 32 46 { THTTPSession } … … 110 124 end; 111 125 112 constructor THTTPSessionStorageMySQL.Create ;126 constructor THTTPSessionStorageMySQL.Create(AOwner: TComponent); 113 127 begin 114 inherited Create;128 inherited; 115 129 Lock := TCriticalSection.Create; 116 130 Sessions := TStringList.Create;
Note:
See TracChangeset
for help on using the changeset viewer.