Ignore:
Timestamp:
Apr 30, 2011, 10:54:24 PM (14 years ago)
Author:
george
Message:
  • Main web server classes reworked as components for easier visual design.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Network/CoolWeb/WebServer/UHTTPSessionFile.pas

    r94 r237  
    1414  THTTPSessionStorageFile = class(THTTPSessionStorage)
    1515  private
     16    FDirectory: string;
     17    FSessionIdCookieName: string;
     18    FTimeout: Integer;
    1619    Lock: TCriticalSection;
    1720    function GetNewSessionId: string;
    1821    procedure GetSessionId(HandlerData: THTTPHandlerData);
    1922  public
    20     Timeout: Integer; // in seconds
    21     Directory: string;
    22     SessionIdCookieName: string;
    2323    Sessions: TStringList;
    2424    procedure Load(HandlerData: THTTPHandlerData); override;
    2525    procedure Save(HandlerData: THTTPHandlerData); override;
    26     constructor Create; override;
     26    constructor Create(AOwner: TComponent); override;
    2727    destructor Destroy; override;
     28  published
     29    property Timeout: Integer read FTimeout write FTimeout; // in seconds
     30    property Directory: string read FDirectory write FDirectory;
     31    property SessionIdCookieName: string read FSessionIdCookieName
     32      write FSessionIdCookieName;
    2833  end;
    2934
     35procedure Register;
     36
    3037implementation
     38
     39procedure Register;
     40begin
     41  RegisterComponents('CoolWeb', [THTTPSessionStorageFile]);
     42end;
     43
    3144
    3245{ THTTPSession }
     
    88101end;
    89102
    90 constructor THTTPSessionStorageFile.Create;
     103constructor THTTPSessionStorageFile.Create(AOwner: TComponent);
    91104begin
    92   inherited Create;
     105  inherited;
    93106  Lock := TCriticalSection.Create;
    94107  Sessions := TStringList.Create;
Note: See TracChangeset for help on using the changeset viewer.