Re: [twsocket] ICS V7 Status

2009-09-10 Thread Anatoly Podgoretsky
Thanks all,

I found it in SVN and it works.

Anatoly Podgoretsky
http://www.podgoretsky.com


- Original Message - 
From: Francois PIETTE francois.pie...@skynet.be
To: ICS support mailing twsocket@elists.org
Sent: Tuesday, September 08, 2009 10:10 PM
Subject: Re: [twsocket] ICS V7 Status


 Francois did not update his website for a long time
 
 Right :-(
 I will do it next week-end.
 
 --
 francois.pie...@overbyte.be
 The author of the freeware multi-tier middleware MidWare
 The author of the freeware Internet Component Suite (ICS)
 http://www.overbyte.be
 
 
 - Original Message - 
 From: Arno Garrels arno.garr...@gmx.de
 To: ICS support mailing twsocket@elists.org
 Sent: Tuesday, September 08, 2009 8:23 PM
 Subject: Re: [twsocket] ICS V7 Status
 
 
 Anatoly Podgoretsky wrote:
 Hi Arno,
 
 I downloaded version from main Overbyte site, link is
 javascript:top.StartDownload('eng',
 'arch/OverbyteIcsV7_Alpha1.zip'); 
 
 Francois did not update his website for a long time, I must
 admit that this is confusing, I pray multiple times a week
 to get ICS from the wiki link :)
 
 --
 Arno Garrels
 
 
 
 Anatoly Podgoretsky
 http://www.podgoretsky.com
 
 
 - Original Message -
 From: Arno Garrels arno.garr...@gmx.de
 To: ICS support mailing twsocket@elists.org
 Sent: Tuesday, September 08, 2009 8:57 PM
 Subject: Re: [twsocket] ICS V7 Status
 
 
 Anatoly Podgoretsky wrote:
 Hi Angus,
 
 Thanks for helps.
 
 I tryed install (with correction of inc file for version Ver210) and
 have no success, 179 warnings and 3 errors.
 
 You obviously did not try to install latest version, instead get
 current ICS from:
 http://wiki.overbyte.be/wiki/index.php/FAQ#How_to_get_ICS
 
 --
 Arno Garrels
 
 
 Anatoly Podgoretsky
 http://www.podgoretsky.com
 
 
 - Original Message -
 From: Angus Robertson - Magenta Systems Ltd an...@magsys.co.uk
 To: twsocket@elists.org
 Sent: Tuesday, September 08, 2009 6:30 PM
 Subject: Re: [twsocket] ICS V7 Status
 
 
 1. Is it posible to use V7 in production environment, how stable
 it now. I plan use as udp client and server, and http client and
 server.
 
 I already use V7 in a production environment, for commercial
 applications.
 
 
 2. What about Delphi 2010?
 
 There were no changes needed in ICS for D2010, except version
 conditionals and new packages, there's no reason to believe it's
 any less reliable than use with Delphi 7, 2007 and 2009.
 
 Angus
 --
 To unsubscribe or change your settings for TWSocket mailing list
 please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
 Visit our website at http://www.overbyte.be
 --
 To unsubscribe or change your settings for TWSocket mailing list
 please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
 Visit our website at http://www.overbyte.be
 --
 To unsubscribe or change your settings for TWSocket mailing list
 please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
 Visit our website at http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] ICS V7 Status

2009-09-08 Thread Anatoly Podgoretsky
Hi!

I have two small questions

1. Is it posible to use V7 in production environment, how stable it now. I plan 
use as udp client and server, and http client and server.

2. What about Delphi 2010?

Anatoly Podgoretsky
http://www.podgoretsky.com

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] ICS V7 Status

2009-09-08 Thread Anatoly Podgoretsky
Hi Angus,

Thanks for helps.

I tryed install (with correction of inc file for version Ver210) and have no 
success, 179 warnings and 3 errors.

Anatoly Podgoretsky
http://www.podgoretsky.com


- Original Message - 
From: Angus Robertson - Magenta Systems Ltd an...@magsys.co.uk
To: twsocket@elists.org
Sent: Tuesday, September 08, 2009 6:30 PM
Subject: Re: [twsocket] ICS V7 Status


 1. Is it posible to use V7 in production environment, how stable it 
 now. I plan use as udp client and server, and http client and 
 server.

 I already use V7 in a production environment, for commercial applications.


 2. What about Delphi 2010?
 
 There were no changes needed in ICS for D2010, except version
 conditionals and new packages, there's no reason to believe it's any less
 reliable than use with Delphi 7, 2007 and 2009. 
 
 Angus
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] ICS V7 Status

2009-09-08 Thread Anatoly Podgoretsky
Hi Arno,

I downloaded version from main Overbyte site, link is 
javascript:top.StartDownload('eng', 'arch/OverbyteIcsV7_Alpha1.zip');

Anatoly Podgoretsky
http://www.podgoretsky.com


- Original Message - 
From: Arno Garrels arno.garr...@gmx.de
To: ICS support mailing twsocket@elists.org
Sent: Tuesday, September 08, 2009 8:57 PM
Subject: Re: [twsocket] ICS V7 Status


 Anatoly Podgoretsky wrote:
 Hi Angus,
 
 Thanks for helps.
 
 I tryed install (with correction of inc file for version Ver210) and
 have no success, 179 warnings and 3 errors.
 
 You obviously did not try to install latest version, instead get
 current ICS from:
 http://wiki.overbyte.be/wiki/index.php/FAQ#How_to_get_ICS
 
 --
 Arno Garrels
 
 
 Anatoly Podgoretsky
 http://www.podgoretsky.com
 
 
 - Original Message -
 From: Angus Robertson - Magenta Systems Ltd an...@magsys.co.uk
 To: twsocket@elists.org
 Sent: Tuesday, September 08, 2009 6:30 PM
 Subject: Re: [twsocket] ICS V7 Status
 
 
 1. Is it posible to use V7 in production environment, how stable it
 now. I plan use as udp client and server, and http client and
 server.
 
 I already use V7 in a production environment, for commercial
 applications. 
 
 
 2. What about Delphi 2010?
 
 There were no changes needed in ICS for D2010, except version
 conditionals and new packages, there's no reason to believe it's any
 less reliable than use with Delphi 7, 2007 and 2009.
 
 Angus
 --
 To unsubscribe or change your settings for TWSocket mailing list
 please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
 Visit our website at http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] [OT] ADOQuery async operation

2008-05-06 Thread Anatoly Podgoretsky
I know, TAdoDataset  is simply to use
No need work with _Recordset

Best regards,
Anatoly Podgoretsky


- Original Message - 
From: Angus Robertson - Magenta Systems Ltd [EMAIL PROTECTED]
To: twsocket@elists.org
Sent: Tuesday, May 06, 2008 6:25 PM
Subject: Re: [twsocket] [OT] ADOQuery async operation


 Instead use TAdoDataset for SELECT only and TAdoConnection / 
 TAdoCommand for other queries
 
 TAdoConnection works fine for SELECT as well, synchronously the EXECUTE
 method returns a _Recordset, as does the ExecuteComplete event for async
 use.  
 
 Higher level ADO and DB components do integrate with VCL, but I've always
 found it easier to build my own EXECUTE statements and parse the
 resultset (ie Recordset.Fields[0].Value) to fill VCL properties. 
 There's nothing worse than a bad date causing an AV filling a date picker.
 I had a bad day on 29th February this year. 
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] NTLM Unicode bug and lazy fix

2008-04-24 Thread Anatoly Podgoretsky
Well? as I know to support Unicode with W9x user must install  Microsoft Layer 
for Unicode.
Information version of MultiByteToWideChar is included in these operating 
systems is new for me.

Best regards,
Anatoly Podgoretsky


- Original Message - 
From: Arno Garrels [EMAIL PROTECTED]
To: ICS support mailing twsocket@elists.org
Sent: Thursday, April 24, 2008 11:15 AM
Subject: Re: [twsocket] NTLM Unicode bug and lazy fix


 Anatoly Podgoretsky wrote:
 
 About support old OS I'm not sure, you must decide itself, realy such
 computers no such more. 
 
 I just read about MultiByteToWideChar() here
 http://msdn2.microsoft.com/en-us/library/ms776413(VS.85).aspx
 
 Windows 95/98/Me: A version of MultiByteToWideChar is included in these 
 operating systems, but a more extensive version of the function is 
 supported by the Microsoft Layer for Unicode.
 
 What the hell does that mean? Perhaps MultiByteToWideChar() alone were
 sufficient, though the old OS _may require the Microsoft Layer for 
 Unicode? I got ConvertINetMultiByteToUnicode() from the mlang.dll running
 which also works in XP. But do we really need this overhead?
 
 Also again about default parameters - what minimal Delphi Version ICS
 must support, defaults not supported with early versions of Delphi,
 but ICS support it's, except last ICS
 
 OK
  
 Another aspect - for example I prefer use such functions not from
 library but coded itself in own code. It's my preferation, that not
 depend from internal realisation of any libraries.  
 
 In this case it is required to handle NTLM authentication.
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] NTLM Unicode bug and lazy fix

2008-04-23 Thread Anatoly Podgoretsky
I think if no support old OS, then code can looks such
Also may be need add addition default parameter CodePade?

function AnsiToUnicode(const AData: String): WideString;
var
Len : Integer;
begin
Len := MultiByteToWideChar(CP_ACP, 0, Pointer(AData), Length(AData), nil, 
0);
if Len  0 then begin
SetLength(Result, Len);
MultiByteToWideChar(CP_ACP, 0, Pointer(AData), Length(AData), 
PWideChar(Result), Len);
end
else
Result := '';
end;
end;

Best regards,
Anatoly Podgoretsky


- Original Message - 
From: Arno Garrels [EMAIL PROTECTED]
To: ICS support mailing twsocket@elists.org
Sent: Wednesday, April 23, 2008 7:59 PM
Subject: [twsocket] NTLM Unicode bug and lazy fix


Hello all,

I stumbled across this function in (OverbyteIcs)NtlmMsg.pas today:

function Unicode(const AData: String): String;
var
I, J : Integer;
begin
SetLength(Result, Length(AData) * 2);
J := 1;
for I := 1 to Length(AData) do begin
Result[J] := AData[I];
Inc(J);
Result[J] := #0;
Inc(J);
end;
end;

This works only with ASCII characters (Basic Latin –007F) reliable. 
This method would work with Latin-1 Supplement 0080–00FF reliable too if 
the OS would use codepage Latin-1 (ISO 8859-1), however there is no
such codepage in Windows, even though Windows 1252 is rather similar to
Latin-1 (ISO 8859-1). 

I think we must use MultiByteToWideChar() to convert Ansi to Unicode,
that would work either if both client and server use the same codepage or
if the server uses Unicode. But this doesn't work with Win9x.

This is a lazy fix, since it doesn't use ConvertINetMultiByteToUnicode() 
which we could call in Win95 with IE v5.5 and later:

{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
{ Convert a text to a unicode text stored }
function UnicodeOld(const AData: String): String;
var
I, J : Integer;
begin
SetLength(Result, Length(AData) * 2);
J := 1;
for I := 1 to Length(AData) do begin
Result[J] := AData[I];
Inc(J);
Result[J] := #0;
Inc(J);
end;
end;


{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
{ Convert a text to a unicode text stored } { A. Garrels}
function Unicode(const AData: String): String;
var
Len : Integer;
begin
if Win32Platform = VER_PLATFORM_WIN32_WINDOWS then
Result := UnicodeOld(AData)
else begin
Len := MultiByteToWideChar(CP_ACP, 0, Pointer(AData),
   Length(AData), nil, 0);
if Len  0 then begin
Len := Len * SizeOf(WideChar);
SetLength(Result, Len);
MultiByteToWideChar(CP_ACP, 0, Pointer(AData), Length(AData),
Pointer(Result), Len);
end
else
Result := '';
end;
end;


{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}

What do you think?

--
Arno Garrels [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] NTLM Unicode bug and lazy fix

2008-04-23 Thread Anatoly Podgoretsky
Hi Arno!

Of cource idea in this, allow enable change default codepage
About support old OS I'm not sure, you must decide itself, realy such computers 
no such more.
Also again about default parameters - what minimal Delphi Version ICS must 
support, defaults not supported with early versions of Delphi, but ICS support 
it's, except last ICS
Another aspect - for example I prefer use such functions not from library but 
coded itself in own code. It's my preferation, that not depend from internal 
realisation of any libraries.

Excuse for my English, I can read free, but write very poor, I believe you 
understand my English.

I very satisfied with ICS. For my needs I tried realize NNTP Server with Indy, 
result bad, with ICS I done it very easy for week. Now Indy and me uncompatible 
things.
ICS very good for professional work, simple, customizible and Delphi style. 
Indy is Unix style not for me.
I know ICS from first days, read this mailing list also from his birthday, but 
use only last year.


Best regards,
Anatoly Podgoretsky


- Original Message - 
From: Arno Garrels [EMAIL PROTECTED]
To: ICS support mailing twsocket@elists.org
Sent: Wednesday, April 23, 2008 9:12 PM
Subject: Re: [twsocket] NTLM Unicode bug and lazy fix


Hello Anatoly,

 I think if no support old OS, then code can looks such

Ok, I shouldn't be lazy, I'll add support for windows 
playstation v0.1 alpha tomorrow as well ;-)

 Also may be need add addition default parameter CodePade?

Good idea to add an optional parameter to be able to specify
a certain codepage (if I read this correctly beween your lines?)
this parameter could default to the current codepage.

What do you think?

--
Arno Garrels [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html


 
 function AnsiToUnicode(const AData: String): WideString;
 var
 Len : Integer;
 begin
 Len := MultiByteToWideChar(CP_ACP, 0, Pointer(AData),
 Length(AData), nil, 0); 
 if Len  0 then begin
 SetLength(Result, Len);
 MultiByteToWideChar(CP_ACP, 0, Pointer(AData), Length(AData),
 PWideChar(Result), Len); 
 end
 else
 Result := '';
 end;
 end;
 
 Best regards,
 Anatoly Podgoretsky
 
 
 - Original Message -
 From: Arno Garrels [EMAIL PROTECTED]
 To: ICS support mailing twsocket@elists.org
 Sent: Wednesday, April 23, 2008 7:59 PM
 Subject: [twsocket] NTLM Unicode bug and lazy fix
 
 
 Hello all,
 
 I stumbled across this function in (OverbyteIcs)NtlmMsg.pas today:
 
 function Unicode(const AData: String): String;
 var
 I, J : Integer;
 begin
 SetLength(Result, Length(AData) * 2);
 J := 1;
 for I := 1 to Length(AData) do begin
 Result[J] := AData[I];
 Inc(J);
 Result[J] := #0;
 Inc(J);
 end;
 end;
 
 This works only with ASCII characters (Basic Latin –007F)
 reliable. 
 This method would work with Latin-1 Supplement 0080–00FF reliable too
 if 
 the OS would use codepage Latin-1 (ISO 8859-1), however there is no
 such codepage in Windows, even though Windows 1252 is rather similar
 to 
 Latin-1 (ISO 8859-1).
 
 I think we must use MultiByteToWideChar() to convert Ansi to Unicode,
 that would work either if both client and server use the same
 codepage or 
 if the server uses Unicode. But this doesn't work with Win9x.
 
 This is a lazy fix, since it doesn't use
 ConvertINetMultiByteToUnicode() 
 which we could call in Win95 with IE v5.5 and later:
 
 {* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * * * *} 
 { Convert a text to a unicode text stored }
 function UnicodeOld(const AData: String): String;
 var
 I, J : Integer;
 begin
 SetLength(Result, Length(AData) * 2);
 J := 1;
 for I := 1 to Length(AData) do begin
 Result[J] := AData[I];
 Inc(J);
 Result[J] := #0;
 Inc(J);
 end;
 end;
 
 
 {* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * * * *} 
 { Convert a text to a unicode text stored } { A. Garrels}
 function Unicode(const AData: String): String;
 var
 Len : Integer;
 begin
 if Win32Platform = VER_PLATFORM_WIN32_WINDOWS then
 Result := UnicodeOld(AData)
 else begin
 Len := MultiByteToWideChar(CP_ACP, 0, Pointer(AData),
Length(AData), nil, 0);
 if Len  0 then begin
 Len := Len * SizeOf(WideChar);
 SetLength(Result, Len);
 MultiByteToWideChar(CP_ACP, 0, Pointer(AData),
 Length(AData), 
 Pointer(Result), Len);
 end
 else
 Result := '';
 end;
 end;
 
 
 {* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * * * *} 
 
 What do you think?
 
 --
 Arno Garrels [TeamICS]
 http://www.overbyte.be/eng/overbyte/teamics.html
 --
 To unsubscribe or change your settings for TWSocket mailing list
 please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
 Visit our website at http

Re: [twsocket] Simple Telnet question

2008-02-17 Thread Anatoly Podgoretsky
Telnet server usualy inform about this escape sequece in Welcome Message, 
usualy it is Ctrl+[

Best regards,
Anatoly Podgoretsky
http://www.podgoretsky.com

 I am using latest ICS telnet connection to develop a simple test tool. This
 tool needs to start and stop a program via telnet. I have no problem
 starting, but I can't find anyway of sending a command from telnet to stop
 it - the equivalent of pressing control  C on the keyboard. 
 
 
 
 I know I could run the application in another thread and end it's process,
 but I need to capture it's output.
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Simple Telnet question

2008-02-17 Thread Anatoly Podgoretsky
Sorry I incorrectly understood your initial question.

About Ctrl+[ - it is not sequence, it is form of expression.
In Delphi you can express it as ^[ or #number, where number is code of 
character [ and $1F, that equal $1B or #27 or ^[

You can send it directly to telnet server, like other keys.

Instead Ctrl+[ it may another combnation of Ctrl+Char


Best regards,
Anatoly Podgoretsky
http://www.podgoretsky.com


- Original Message - 
From: Paul [EMAIL PROTECTED]
To: 'ICS support mailing' twsocket@elists.org
Sent: Sunday, February 17, 2008 1:40 PM
Subject: Re: [twsocket] Simple Telnet question


 Thank you, but my problem is I cannot see how to send this using ICS telnet
 connection.
 
 How can I send CTRL ?
 
 Thanks - Paul
 
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
 Behalf Of Anatoly Podgoretsky
 Sent: 17 February 2008 11:19
 To: ICS support mailing
 Subject: Re: [twsocket] Simple Telnet question
 
 Telnet server usualy inform about this escape sequece in Welcome Message,
 usualy it is Ctrl+[
 
 Best regards,
 Anatoly Podgoretsky
 http://www.podgoretsky.com
 
 I am using latest ICS telnet connection to develop a simple test tool.
 This
 tool needs to start and stop a program via telnet. I have no problem
 starting, but I can't find anyway of sending a command from telnet to stop
 it - the equivalent of pressing control  C on the keyboard. 
 
 
 
 I know I could run the application in another thread and end it's process,
 but I need to capture it's output.
 -- 
 To unsubscribe or change your settings for TWSocket mailing list
 please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
 Visit our website at http://www.overbyte.be
 
 -- 
 To unsubscribe or change your settings for TWSocket mailing list
 please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
 Visit our website at http://www.overbyte.be
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] How to use THttpCli with threads?

2006-10-06 Thread Anatoly Podgoretsky
Hi Arno and Francois,

I understood my my mistake. I think that TBaseThread.Create is thread context 
and it is wrong.
I found another decision. Nnow I create HtthCli before creating TBaseThread and 
put reference of it in TBaseThread.create. When TBaseThread terminate I free 
instanse of HtthCli in OnTerminate Event handler/
I 'll look for multithread sample programs for better understanding a 
technology.

What about TBaseThread.Destroy in wich context it execute? In context of thread?

With best regards,
Anatoly Podgoretsky

- Original Message - 
From: Francois Piette [EMAIL PROTECTED]
To: ICS support mailing twsocket@elists.org
Sent: Friday, October 06, 2006 10:11 AM
Subject: Re: [twsocket] How to use THttpCli with threads?


 What I'm doing wrong?
 
 Your HTTP component runs in the main thread since you created in the context
 of the main thread (TThread constructor execute in the context of the
 calling thread, not in the context of the created thread). Create you HTTP
 component instance from the thread's Execute method and free it at the end
 of the Execute method. Don't forget to have a message pump within your
 Execute method also. Look at the multithread sample programs delivered with
 ICS. See their creation date. Generally to more recent the better they are.
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] How to use THttpCli with threads?

2006-10-06 Thread Anatoly Podgoretsky
I ask before about

1. What I set to property Multitreaded? I don't understand it.
I did? I believe I must.

and about

3. In all examples I see that I must access HttpCli data with Memory Stream 
(ms.LoadFromStream(StringList) - is another method to access received data 
without a stream? Directly. Like HttpCli.Get, HttpCli.Body.

It isn't?

With best regards,
Anatoly Podgoretsky
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] How to use THttpCli with threads?

2006-10-06 Thread Anatoly Podgoretsky
Hi Frans,

Examples and third party demos are very high, really I don't catch all of them. 
:-)

But I looked its example and see that my current code very similar.

With best regards,
Anatoly Podgoretsky

- Original Message - 
From: Frans van Daalen [EMAIL PROTECTED]

I think the best way Francois provide us a full multi-threading  example
 for HttpCli or any member in the list already done sample for that.

 
 like HttpThrd which is a http thread demo and available in the demo 
 directory ??? 
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] How to use THttpCli with threads?

2006-10-06 Thread Anatoly Podgoretsky
Thanks Abdullah,

Now I look HttpThr example

With best regards,
Anatoly Podgoretsky



- Original Message - 
From: Abdullah AlQasim [EMAIL PROTECTED]
To: ICS support mailing twsocket@elists.org
Sent: Friday, October 06, 2006 4:51 PM
Subject: Re: [twsocket] How to use THttpCli with threads?


I think the best way Francois provide us a full multi-threading  example 
 for HttpCli or any member in the list already done sample for that.
 
 
 Anatoly Podgoretsky wrote:
 I ask before about

 1. What I set to property Multitreaded? I don't understand it.
 I did? I believe I must.

 and about

 3. In all examples I see that I must access HttpCli data with Memory Stream 
 (ms.LoadFromStream(StringList) - is another method to access received data 
 without a stream? Directly. Like HttpCli.Get, HttpCli.Body.

 It isn't?

 With best regards,
 Anatoly Podgoretsky
   
 
 -- 
 To unsubscribe or change your settings for TWSocket mailing list
 please goto http://www.elists.org/mailman/listinfo/twsocket
 Visit our website at http://www.overbyte.be
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] How to use THttpCli with threads?

2006-10-05 Thread Anatoly Podgoretsky
Hi!

I want use THttpCli within TTread, but when I close application it eception 
with AV at address 0
Code follow

constructor TBaseThread.Create;
begin
  inherited Create(False);
  FreeOnTerminate := True;
  HttpClient  := THttpCli.Create(nil);
{
  HttpClient.Agent  := 'Anatoly Podgoretsky NNTP Server';
  HttpClient.MultiThreaded  := True;
}
end;
//**
// разрушение базового потока
//**
destructor TBaseThread.Destroy;
begin
  HttpClient.Free;
  inherited;
end;

What I'm doing wrong?
Thread do nothing with main thread, this code only for testing. Real will 
written in future

With best regards,
Anatoly Podgoretsky


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Re: [twsocket] How to use THttpCli with threads?

2006-10-05 Thread Anatoly Podgoretsky
Hi all,

I carefully reread a FAQ and see other scenario.
Divide process into two pieces, download information from WEB site into main 
thread (ClientConnection) and run thread after data received only for database 
work.

My application is NNTP server with downloading information from one site, put 
it into database and news client get this information from database.

Client ask NNTP server for information, standard protocol. 
Server get request and ask information from database, then immediatelly reply 
to clent.
After it, server dynamically create some HttpCli and start downloading in 
asynchronous mode.
When In OnRequestDone server start a one or more individual threads only for 
heavy load database work. 
Thread do not cooperate with main thread, except OnTerminate Event.
During this operation client can ask other piece of information and this 
operation can start simultaneosy with paralel downloading a data and operating 
with database.

It is a right way? May be is other decision?

And now I have some questions:

1. What I set to property Multitreaded? I don't understand it.

2. Where and when I can destroy HttpCli
   a. In Event Handler OnRequestDone event, I think it's bad idea because it's 
a Event handler of HttpCli.
   b. I can send a user message itself, but how I can decide witch HttpCli I 
must destroy HttpCli.
   c. Destroy HttpCli on OnTerminate a thread.
   d. Destroy HttpCli on each Client request checking witch HttpCli is ready 
for destroy

3. In all examples I see that I must access HttpCli data with Memory Stream 
(ms.LoadFromStream(StringList) - is another method to access received data 
withou a stream? Directly. Like HttpCli.Get, HttpCli.Body.

I need your opinion about this scheme, how it right, another decision with 
simultaneously multi downloading from site and operate with received data with 
threads.

With best regards,
Anatoly Podgoretsky

- Original Message - 
From: Anatoly Podgoretsky [EMAIL PROTECTED]

 I want use THttpCli within TTread, but when I close application it eception 
 with AV at address 0
 Code follow
 
 constructor TBaseThread.Create;
 begin
  inherited Create(False);
  FreeOnTerminate := True;
  HttpClient  := THttpCli.Create(nil);
 {
  HttpClient.Agent  := 'Anatoly Podgoretsky NNTP Server';
  HttpClient.MultiThreaded  := True;
 }
 end;
 //**
 // разрушение базового потока
 //**
 destructor TBaseThread.Destroy;
 begin
  HttpClient.Free;
  inherited;
 end;
 
 What I'm doing wrong?
 Thread do nothing with main thread, this code only for testing. Real will 
 written in future
 
 With best regards,
 Anatoly Podgoretsky
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Re: [twsocket] Writing a transparent HTTP proxy

2006-10-04 Thread Anatoly Podgoretsky
Hi!

Transparent proxy works as mediator, listen all incoming request on port 80 or 
any predefined ports. 
Then check if page in cache and if not ask site for page, move it cache and 
returns to caller. 

Caller don't know is proxy or not, because it is transparently for him.

With best regards,
Anatoly Podgoretsky



- Original Message - 
From: Kris Leech [EMAIL PROTECTED]
To: ICS support mailing twsocket@elists.org
Sent: Wednesday, October 04, 2006 11:18 AM
Subject: Re: [twsocket] Writing a transparent HTTP proxy


 Hi, did you find the answer to this?
 
 Fastream Technologies wrote:
 
Hello,

I have a few issues left for understanding how a transparent proxy works. I
talked with a friend in an ISP how they configure them and he said they use
Layer4 switches to redirect all HTTP port 80 traffic to the proxy even
though the end user does not configures his browser settings for the proxy.
Now with our reverse proxy experience, all is well except one thing: How
does the proxy know which IP to connect to when the end user uses HTTP/1.0
with no host header? Is transparent proxies HTTP/1.1 only? How does the
Layer4 switch understands what protocol does the end user uses if it can
read just up to layer 4 (TCP)?

Best Regards,

SZ
  

 
 
 -- 
 To unsubscribe or change your settings for TWSocket mailing list
 please goto http://www.elists.org/mailman/listinfo/twsocket
 Visit our website at http://www.overbyte.be
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be