Re: [twsocket] SSL Session Cache (was OpenSSL hardware accelerators)

2009-02-17 Thread Fastream Technologies
Ok. Let me be clearer on our customers' need--there are ISPs with
hundreds of domains and they cannot rely on clients to support session
caching--there is a NEED for OpenSSL HARDWARE CARDS support for PCI
slots. Otherwise 20-25 SSL connections for different client IP/ports
is insufficient for pros.

Regards,

Gorkem Ates

On Mon, Feb 16, 2009 at 9:00 PM, Arno Garrels arno.garr...@gmx.de wrote:
 Fastream Technologies wrote:

 Make sure session caching is working, it can notably increase the
 maximum number of plain accepts per second. Note that the client must
 support session caching as well, otherwise it would work. However
 most common browsers support it.

 Ok. Do you have a tool that is capable of sess. caching and web stress
 testing?

 Yes, I use a my private, ugly tool. It most likely does not messure
 what you are after and it is not made for the public.

 I used my own web stress tester but that is not capable of it
 right now!

 It is so easy to add two event handlers and enter three lines each,
 look at the sample OverbyteIcsHttpsTst.cbproj in the ICS V7 SVN repository
 (including property SslContext.SslSessionCacheModes).

 --
 Arno Garrels


 --
 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




-- 
Gorkem Ates
Fastream Technologies
Software IQ: Innovation  Quality
www.fastream.com | Email: supp...@fastream.com | Tel: +90-312-223-2830
| MSN: g_a...@hotmail.com
Join IQWF Server Yahoo group at http://groups.yahoo.com/group/IQWFServer
Join IQ Reverse Proxy Yahoo group at
http://groups.yahoo.com/group/IQReverseProxy
-- 
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] Freeing of sockets

2009-02-17 Thread Markus Müller
Hello Mailinglist,

my project is now just working great, thanks very much for your
help... but there is just one question. Cause it only works fine
if I don't free TWSocket objects. If I Free them it often works
fine. But in much cases - for example - in the OnSessionClose
Handler (the memory of the handler is provided by an other Object
not beeing freed) then I get strange behaviors. Sometimes it gives
memory errors on InternalClose functions, sometimes the application
just freezes completely (strange cause all TWSocket is in an own
thread) and Delphi crashes the hard way...

If I do Abort on an TWSocket, then the following lines are not
running... It seems that it calls exit withing the function? So my
Free is never reached. In this case I have completly no idear
how to Free such a socket

So my question is: How can I free a TWSocket object after the
connection has been closed, aborted or the handler reports that
the session has been closed.

Thanks for hints,
Much regards,
Markus Mueller

-- 
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] Freeing of sockets

2009-02-17 Thread Wilfried Mestdagh
Hello Markus,

you have to destroy it outside an event handler. to do that you can call
the Release method. Then it is destroyed when messages are pumped again,
so after your code finish.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Tuesday, February 17, 2009, 10:40, Markus Müller wrote:

 Hello Mailinglist,

 my project is now just working great, thanks very much for your
 help... but there is just one question. Cause it only works fine
 if I don't free TWSocket objects. If I Free them it often works
 fine. But in much cases - for example - in the OnSessionClose
 Handler (the memory of the handler is provided by an other Object
 not beeing freed) then I get strange behaviors. Sometimes it gives
 memory errors on InternalClose functions, sometimes the application
 just freezes completely (strange cause all TWSocket is in an own
 thread) and Delphi crashes the hard way...

 If I do Abort on an TWSocket, then the following lines are not
 running... It seems that it calls exit withing the function? So my
 Free is never reached. In this case I have completly no idear
 how to Free such a socket

 So my question is: How can I free a TWSocket object after the
 connection has been closed, aborted or the handler reports that
 the session has been closed.

 Thanks for hints,
 Much regards,
 Markus Mueller


-- 
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] [OT] Problem migrating ProxyInfo to D2009

2009-02-17 Thread Maurizio Lotauro
Hi,

during the migration of my TProxyInfo component to D2009 I get a strange problem
that get me crazy. One API always fail with error 1003 (Cannot complete this
function). The exactly same code with D5 works (it show XYZT).
I explicitly declared Ansi what must be Ansi, so I really don't understand
what's wrong. 
If someone has an idea why it doesn't work, the follow is a sample code:


type
  PAutoProxyScriptBuffer = ^AUTO_PROXY_SCRIPT_BUFFER;
  AUTO_PROXY_SCRIPT_BUFFER = packed record
dwStructSize: DWORD;
lpszScriptBuffer: LPSTR;
dwScriptBufferSize: DWORD;
  end;
  TAutoProxyScriptBuffer = AUTO_PROXY_SCRIPT_BUFFER;

  TInitializeAutoProxyDll = function (
  dwVersion: DWORD;
  lpszDownloadedTempFile: LPSTR;
  lpszMime: LPSTR;
  lpAutoProxyCallbacks: Pointer;  //
AutoProxyHelperFunctions*
  lpAutoProxyScriptBuffer:
PAutoProxyScriptBuffer
 ): BOOL; stdcall;

  TGetProxyInfo = function (
lpszUrl: LPCSTR;
dwUrlLength: DWORD;
lpszUrlHostName: LPSTR;
dwUrlHostNameLength: DWORD;
out lplpszProxyHostName: LPSTR;
out lpdwProxyHostNameLength: DWORD
   ): BOOL; stdcall;

  TDeInitializeAutoProxyDll = function (
lpszMime: LPSTR;
dwReserved: DWORD
   ): BOOL; stdcall;

procedure TForm1.Button1Click(Sender: TObject);
var
  LibHandle: THandle;
  InitializeAutoProxyDll: TInitializeAutoProxyDll;
  GetProxyInfo: TGetProxyInfo;
  DeInitializeAutoProxyDll: TDeInitializeAutoProxyDll;
  ScriptText: AnsiString;
  ScriptBuffer: TAutoProxyScriptBuffer;
  Url: AnsiString;
  Host: AnsiString;
  ProxyName: PAnsiChar;
  ProxyLength: LongWord;
begin
  LibHandle := SafeLoadLibrary('jsproxy.dll');
  if LibHandle = 0 then
Exit;

  try
@InitializeAutoProxyDll := GetProcAddress(LibHandle,
'InternetInitializeAutoProxyDll');
if @InitializeAutoProxyDll = nil then
begin
  ShowMessageFmt('GetProcAddress(''InternetInitializeAutoProxyDll'') failed:
error %d (%s)', [GetLastError, SysErrorMessage(GetLastError)]);
  Exit;
end;

@GetProxyInfo := GetProcAddress(LibHandle, 'InternetGetProxyInfo');
if @GetProxyInfo = nil then
begin
  ShowMessageFmt('GetProcAddress(''InternetGetProxyInfo'') failed: error %d
(%s)', [GetLastError, SysErrorMessage(GetLastError)]);
  Exit;
end;

@DeInitializeAutoProxyDll := GetProcAddress(LibHandle,
'InternetDeInitializeAutoProxyDll');
if @DeInitializeAutoProxyDll = nil then
begin
  ShowMessageFmt('GetProcAddress(''InternetDeInitializeAutoProxyDll'')
failed: error %d (%s)', [GetLastError, SysErrorMessage(GetLastError)]);
  Exit;
end;

ScriptText := 'function FindProxyForURL(url, host)'#13#10'{'#13#10'return
XYZT;'#13#10'}'#13#10;
ScriptBuffer.dwStructSize := SizeOf(TAutoProxyScriptBuffer);
ScriptBuffer.lpszScriptBuffer := PAnsiChar(ScriptText);
ScriptBuffer.dwScriptBufferSize := Length(ScriptText) + 1;
if not InitializeAutoProxyDll(0, nil, nil, nil, @ScriptBuffer) then
begin
  ShowMessageFmt('InternetInitializeAutoProxyDll() failed: error %d (%s)',
[GetLastError, SysErrorMessage(GetLastError)]);
  Exit;
end;

try
  Url := 'URL';
  Host := 'host';
  ProxyName := nil;
  try
if not GetProxyInfo(PAnsiChar(Url), Length(Url) + 1, PAnsiChar(Host),
Length(Host) + 1, ProxyName, ProxyLength) then
begin
  ShowMessageFmt('InternetGetProxyInfo() failed: error %d (%s)',
[GetLastError, SysErrorMessage(GetLastError)]);
  Exit;
end;
ShowMessage(ProxyName);
  finally
if ProxyName  nil then
  GlobalFree(HGLOBAL(ProxyName));
  end;
finally
  if not DeInitializeAutoProxyDll(nil, 0) then
ShowMessageFmt('InternetDeInitializeAutoProxyDll() failed: error %d
(%s)', [GetLastError, SysErrorMessage(GetLastError)]);
end;
  finally
FreeLibrary(LibHandle);
  end;
end;


Bye, Maurizio.


This mail has been sent using Alpikom webmail system
http://www.alpikom.it

-- 
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] Problem migrating ProxyInfo to D2009

2009-02-17 Thread Arno Garrels
Hi Maurizio,

 One API always fail with error 1003 

Which one? Which line?

From a very brief look:

 TGetProxyInfo = function (
lpszUrl: LPCSTR;

LPCSTR maps to either Ansi or Unicode, however you pass it a PAnsiChar
URL?

--
Arno Garrels



-- 
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] Problem migrating ProxyInfo to D2009

2009-02-17 Thread Maurizio Lotauro
Scrive Arno Garrels arno.garr...@gmx.de:

 Hi Maurizio,

Hi Arno,

  One API always fail with error 1003 
 
 Which one? Which line?

When the GetProxyInfo is called.
You can try yourself, the code that I posted practically works out of the box.

 From a very brief look:
 
  TGetProxyInfo = function (
 lpszUrl: LPCSTR;
 
 LPCSTR maps to either Ansi or Unicode, however you pass it a PAnsiChar
 URL?

No, LPCSTR maps only to PAnsiChar. The type you are referring is LPCTSTR.


Bye, Maurizio.


This mail has been sent using Alpikom webmail system
http://www.alpikom.it

-- 
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] Problem migrating ProxyInfo to D2009

2009-02-17 Thread Arno Garrels
Maurizio Lotauro wrote:
 Scrive Arno Garrels arno.garr...@gmx.de:
 
 Hi Maurizio,
 
 Hi Arno,
 
 One API always fail with error 1003
 
 Which one? Which line?
 
 When the GetProxyInfo is called.
 You can try yourself, the code that I posted practically works out of
 the box. 

What is TInitializeAutoProxyDll?

 
 From a very brief look:
 
 TGetProxyInfo = function (
 lpszUrl: LPCSTR;
 
 LPCSTR maps to either Ansi or Unicode, however you pass it a
 PAnsiChar URL?
 
 No, LPCSTR maps only to PAnsiChar. The type you are referring is
 LPCTSTR. 

Arrgh, mixed up the types :)

--
Arno Garrels 

 
 
 Bye, Maurizio.
 
 
 This mail has been sent using Alpikom webmail system
 http://www.alpikom.it
-- 
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] Problem migrating ProxyInfo to D2009

2009-02-17 Thread Arno Garrels
Arno Garrels wrote:
 
 What is TInitializeAutoProxyDll?

Sorry, found, I should stop coding today :)

--
Arno Garrels


-- 
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] Problem migrating ProxyInfo to D2009

2009-02-17 Thread Matt Minnis
Yeah, we all have days like that.
On those days, you'll save yourself time by doing something else. 

-Original Message-
From: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] On
Behalf Of Arno Garrels
Sent: Tuesday, February 17, 2009 13:20
To: ICS support mailing
Subject: Re: [twsocket] [OT] Problem migrating ProxyInfo to D2009

Arno Garrels wrote:
 
 What is TInitializeAutoProxyDll?

Sorry, found, I should stop coding today :)

--
Arno Garrels


-- 
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] How to: Client -- many servers

2009-02-17 Thread Verstrepen
Hello,
 
I have the next situation:
 
I need to connect to industrial printers for printing on packaging witch
are acting like servers.
So, what I do is: I create a client and connect to such a printer. This
works fine.
 
Now I have to modify my application that I have to search in a range of
IP-adresses for such printers.
When I find a printer, I have to connect to it and searching further for
more printers.
So, I can have more connections ( Client-- printer )
I know how to work with 1 Server-- many Client connections, but this is
many clients--to many servers.
How can I past a server of a printer to a client and searching for the
next server of a printer.?
 
I am using Delphi 2007 + ICS V5
 
Best regards,
Eric
-- 
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] Problem migrating ProxyInfo to D2009

2009-02-17 Thread Arno Garrels
Matt Minnis wrote:
 Yeah, we all have days like that.
 On those days, you'll save yourself time by doing something else.

Thanks, that's helpful, I'll try to continue investigating deeper 
reasons of the financial crisis today, very interesting stuff, btw! But 
unfortunately rather OT. 
  
--
Arno Garrels 

 

 
 -Original Message-
 From: twsocket-boun...@elists.org
 [mailto:twsocket-boun...@elists.org] On Behalf Of Arno Garrels
 Sent: Tuesday, February 17, 2009 13:20
 To: ICS support mailing
 Subject: Re: [twsocket] [OT] Problem migrating ProxyInfo to D2009
 
 Arno Garrels wrote:
 
 What is TInitializeAutoProxyDll?
 
 Sorry, found, I should stop coding today :)
 
 --
 Arno Garrels
 
 
 --
 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] Freeing of sockets

2009-02-17 Thread Markus Mueller
Hi Wilfried,

I have created an destructor Free, which inherited runs Free of 
TWSocket. This
Free is never called; can anybody tell me why?

Are you realy sure it is freed by calling Release if it is never calling 
Free?!

Regards,
Markus Mueller
 Hello Markus,

 you have to destroy it outside an event handler. to do that you can call
 the Release method. Then it is destroyed when messages are pumped again,
 so after your code finish.

 ---
 Rgds, Wilfried [TeamICS]
 http://www.overbyte.be/eng/overbyte/teamics.html
 http://www.mestdagh.biz

 Tuesday, February 17, 2009, 10:40, Markus Müller wrote:

   
 Hello Mailinglist,
 

   
 my project is now just working great, thanks very much for your
 help... but there is just one question. Cause it only works fine
 if I don't free TWSocket objects. If I Free them it often works
 fine. But in much cases - for example - in the OnSessionClose
 Handler (the memory of the handler is provided by an other Object
 not beeing freed) then I get strange behaviors. Sometimes it gives
 memory errors on InternalClose functions, sometimes the application
 just freezes completely (strange cause all TWSocket is in an own
 thread) and Delphi crashes the hard way...
 

   
 If I do Abort on an TWSocket, then the following lines are not
 running... It seems that it calls exit withing the function? So my
 Free is never reached. In this case I have completly no idear
 how to Free such a socket
 

   
 So my question is: How can I free a TWSocket object after the
 connection has been closed, aborted or the handler reports that
 the session has been closed.
 

   
 Thanks for hints,
 Much regards,
 Markus Mueller
 


   

-- 
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: Client -- many servers

2009-02-17 Thread Francois PIETTE
 I need to connect to industrial printers for printing on packaging witch
 are acting like servers.
 So, what I do is: I create a client and connect to such a printer. This
 works fine.

 Now I have to modify my application that I have to search in a range of
 IP-adresses for such printers.
 When I find a printer, I have to connect to it and searching further for
 more printers.
 So, I can have more connections ( Client-- printer )
 I know how to work with 1 Server-- many Client connections, but this is
 many clients--to many servers.
 How can I past a server of a printer to a client and searching for the
 next server of a printer.?

If you have to be connected simultaneously to many servers, simply use as 
many TWSocket as you have server.
If you connect to a server, send something, disconnect and go with next 
server, then you can use a single TWSocket.

--
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

-- 
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] Freeing of sockets

2009-02-17 Thread Olivier Sannier
Destructor must be called Destroy, not Free

Markus Mueller wrote:
 Hi Wilfried,

 I have created an destructor Free, which inherited runs Free of 
 TWSocket. This
 Free is never called; can anybody tell me why?

 Are you realy sure it is freed by calling Release if it is never calling 
 Free?!

 Regards,
 Markus Mueller
   
 Hello Markus,

 you have to destroy it outside an event handler. to do that you can call
 the Release method. Then it is destroyed when messages are pumped again,
 so after your code finish.

 ---
 Rgds, Wilfried [TeamICS]
 http://www.overbyte.be/eng/overbyte/teamics.html
 http://www.mestdagh.biz

 Tuesday, February 17, 2009, 10:40, Markus Müller wrote:

   
 
 Hello Mailinglist,
 
   
   
 
 my project is now just working great, thanks very much for your
 help... but there is just one question. Cause it only works fine
 if I don't free TWSocket objects. If I Free them it often works
 fine. But in much cases - for example - in the OnSessionClose
 Handler (the memory of the handler is provided by an other Object
 not beeing freed) then I get strange behaviors. Sometimes it gives
 memory errors on InternalClose functions, sometimes the application
 just freezes completely (strange cause all TWSocket is in an own
 thread) and Delphi crashes the hard way...
 
   
   
 
 If I do Abort on an TWSocket, then the following lines are not
 running... It seems that it calls exit withing the function? So my
 Free is never reached. In this case I have completly no idear
 how to Free such a socket
 
   
   
 
 So my question is: How can I free a TWSocket object after the
 connection has been closed, aborted or the handler reports that
 the session has been closed.
 
   
   
 
 Thanks for hints,
 Much regards,
 Markus Mueller
 
   
   
 

   

-- 
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