Changeset 295 for Network/CoolWeb
- Timestamp:
- Nov 15, 2011, 8:46:43 AM (13 years ago)
- Location:
- Network/CoolWeb
- Files:
-
- 2 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
Network/CoolWeb/CoolWeb.lpk
r255 r295 11 11 <UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/> 12 12 </SearchPaths> 13 <Linking> 14 <Debugging> 15 <GenerateDebugInfo Value="True"/> 16 <DebugInfoType Value="dsAuto"/> 17 </Debugging> 18 </Linking> 13 19 <Other> 14 20 <CompilerMessages> … … 21 27 <License Value="GNU/GPL"/> 22 28 <Version Minor="2"/> 23 <Files Count="1 8">29 <Files Count="16"> 24 30 <Item1> 25 31 <Filename Value="WebServer/UHTTPServer.pas"/> … … 76 82 </Item12> 77 83 <Item13> 78 <Filename Value="Common/U Pool.pas"/>79 <UnitName Value="U Pool"/>84 <Filename Value="Common/UXmlClasses.pas"/> 85 <UnitName Value="UXmlClasses"/> 80 86 </Item13> 81 87 <Item14> 82 <Filename Value="Common/UResetableThread.pas"/>83 <UnitName Value="UResetableThread"/>84 </Item14>85 <Item15>86 <Filename Value="Common/UXmlClasses.pas"/>87 <UnitName Value="UXmlClasses"/>88 </Item15>89 <Item16>90 88 <Filename Value="WebServer/UWebPage.pas"/> 91 89 <HasRegisterProc Value="True"/> 92 90 <UnitName Value="UWebPage"/> 93 </Item1 6>94 <Item1 7>91 </Item14> 92 <Item15> 95 93 <Filename Value="WebServer/UWebApp.pas"/> 96 94 <HasRegisterProc Value="True"/> 97 95 <UnitName Value="UWebApp"/> 98 </Item1 7>99 <Item1 8>96 </Item15> 97 <Item16> 100 98 <Filename Value="LazIDEReg.pas"/> 101 99 <HasRegisterProc Value="True"/> 102 100 <UnitName Value="LazIDEReg"/> 103 </Item1 8>101 </Item16> 104 102 </Files> 105 103 <Type Value="RunAndDesignTime"/> -
Network/CoolWeb/CoolWeb.pas
r254 r295 10 10 UHTTPServer, UHTTPServerCGI, UHTTPServerTCP, UHTTPSessionFile, 11 11 UHTTPSessionMySQL, USqlDatabase, UTCPServer, UPageList, UUser, UHtmlClasses, 12 UMemoryStreamEx, UMIMEType, U Pool, UResetableThread, UXmlClasses, UWebPage,13 UWebApp, LazIDEReg,LazarusPackageIntf;12 UMemoryStreamEx, UMIMEType, UXmlClasses, UWebPage, UWebApp, LazIDEReg, 13 LazarusPackageIntf; 14 14 15 15 implementation -
Network/CoolWeb/Network/UTCPServer.pas
r94 r295 1 1 unit UTCPServer; 2 2 3 {$mode objfpc}{$H+}3 {$mode Delphi}{$H+} 4 4 5 5 interface … … 23 23 Parent: TTCPServer; 24 24 Socket: TTCPBlockSocket; 25 procedure Execute; override;25 procedure Execute; 26 26 constructor Create; 27 27 destructor Destroy; override; … … 30 30 { TClientThreadedPool } 31 31 32 TClientThreadedPool = class(TThread edPool)32 TClientThreadedPool = class(TThreadPool) 33 33 private 34 34 FActive: Boolean; … … 152 152 begin 153 153 inherited; 154 Method := Execute; 154 155 Socket := TTCPBlockSocket.Create; 155 156 end; … … 164 165 165 166 procedure TClientThreadedPool.SetActive(const AValue: Boolean); 166 var167 I: Integer;168 167 begin 169 if not FActive and AValue then begin170 for I := 0 to TotalCount - 1 do begin171 TThreadedPoolItem(Items[I]).Item := TTCPClientThread.Create;172 end;173 end else174 if FActive and not AValue then begin175 176 end;177 168 FActive := AValue; 178 169 end; -
Network/CoolWeb/Persistence/USqlDatabase.pas
r258 r295 39 39 FHostName: string; 40 40 FPassword: string; 41 FPort: Word; 41 42 FSession: PMYSQL; 42 43 FConnected: Boolean; … … 81 82 property UserName: string read FUserName write FUserName; 82 83 property Password: string read FPassword write FPassword; 84 property Port: Word read FPort write FPort; 83 85 property Encoding: string read FEncoding write FEncoding; 84 86 property OnLogQuery: TLogEvent read FOnLogQuery write FOnLogQuery; … … 184 186 // FSession.charset := 'latin2'; 185 187 NewSession := mysql_real_connect(FSession, PChar(HostName), PChar(UserName), 186 PChar(Password), PChar(Database), 3306, nil, CLIENT_LONG_PASSWORD + CLIENT_CONNECT_WITH_DB);188 PChar(Password), PChar(Database), FPort, nil, CLIENT_LONG_PASSWORD + CLIENT_CONNECT_WITH_DB); 187 189 if Assigned(NewSession) then begin 188 190 FConnected := True; … … 360 362 FSession := nil; 361 363 Encoding := 'utf8'; 364 FPort := 3306; 362 365 end; 363 366
Note:
See TracChangeset
for help on using the changeset viewer.