Re: [twsocket] ICS functions blocked when UI is active

2008-06-04 Thread Francois Piette
Using a separate thread to run your socket stuff is probably a good idea in
that situation.

Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
--
[EMAIL PROTECTED]
Author of ICS (Internet Component Suite, freeware)
Author of MidWare (Multi-tier framework, freeware)
http://www.overbyte.be


- Original Message - 
From: John D Algeo [EMAIL PROTECTED]
To: twsocket@elists.org
Sent: Wednesday, June 04, 2008 12:48 AM
Subject: [twsocket] ICS functions blocked when UI is active


 I have observed that Windows does not pass messages to an application when
certain User Interface functions are active.  Examples are an open drop-down
menu or a user dragging a window.  This can cause ICS functions such as this
Socket Open code to fail:

{ Use while to repeat connects to ensure enough time for reset to end }
 tTarget := Time + ((FiResetTime / 1000.0) / 86400.0);
 while not FfConnected and (Time  tTarget) do begin
   FiLastError := SocketConnect; { Sets FfConnecting }
   if FiLastError = FX_OK then
   begin
 { FfConnecting is cleared by FWSocketSessionConnected, may happen
on
   socket connection timeout }
 while FfConnecting do
   Application.ProcessMessages;{ This can be
FWSocket.MessagePump; }
   end; {if FiLastError=FX_OK}
 end; {while not connected}

 With a drop-down menu open, this will run as for long as FiResetTime is
set ( 30 seconds) without connecting.

 Is there a way to make Windows continue to pass messages even if a
drop-down menu or other UI function is active?

 Thanks,
 John
 -- 
 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] ICS functions blocked when UI is active

2008-06-04 Thread Dod
Hello,

I  personnaly  always  create  and  manage  the  socket component in a
separated thread. This permit to avoid such problem, and also when the
reverse  appear  when  your socket procedures has a very high activity
that  could  slow  down the main's app message queue that make it less
responsive (or near freezed).

regards.


 I have observed that Windows does not pass messages to an application when
FP certain User Interface functions are active.  Examples are an open drop-down
FP menu or a user dragging a window.  This can cause ICS functions such as this
FP Socket Open code to fail:

{ Use while to repeat connects to ensure enough time for reset to end }
 tTarget := Time + ((FiResetTime / 1000.0) / 86400.0);
 while not FfConnected and (Time  tTarget) do begin
   FiLastError := SocketConnect; { Sets FfConnecting }
   if FiLastError = FX_OK then
   begin
 { FfConnecting is cleared by FWSocketSessionConnected, may happen
FP on
   socket connection timeout }
 while FfConnecting do
   Application.ProcessMessages;{ This can be
FP FWSocket.MessagePump; }
   end; {if FiLastError=FX_OK}
 end; {while not connected}

 With a drop-down menu open, this will run as for long as FiResetTime is
set ( 30 seconds) without connecting.

 Is there a way to make Windows continue to pass messages even if a
FP drop-down menu or other UI function is active?

 Thanks,
 John
 -- 
 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] ICS functions blocked when UI is active

2008-06-04 Thread Wilfried Mestdagh
Hello John,

Normally this is no problem. I think with dropdown menu open there is no
problem also, because windows is pumping messages when a menu is open.

But depending on your applicaiton you can do the socket thing in a
separate thread. Other possibility is to run the communication in a
NT service and have the user interface (separate application) talk to
the service with eg a named pipe (or another tcp connection).

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

Wednesday, June 4, 2008, 00:48, John D Algeo wrote:

 I have observed that Windows does not pass messages to an
 application when certain User Interface functions are active. 
 Examples are an open drop-down menu or a user dragging a window.  This
 can cause ICS functions such as this Socket Open code to fail:

{ Use while to repeat connects to ensure enough time for reset to end }
 tTarget := Time + ((FiResetTime / 1000.0) / 86400.0);
 while not FfConnected and (Time  tTarget) do begin
   FiLastError := SocketConnect; { Sets FfConnecting }
   if FiLastError = FX_OK then
   begin
 { FfConnecting is cleared by FWSocketSessionConnected, may happen on
   socket connection timeout }
 while FfConnecting do
   Application.ProcessMessages;{ This can be FWSocket.MessagePump; 
 }
   end; {if FiLastError=FX_OK}
 end; {while not connected}

 With a drop-down menu open, this will run as for long as
 FiResetTime is set ( 30 seconds) without connecting.

 Is there a way to make Windows continue to pass messages even if a
 drop-down menu or other UI function is active?

 Thanks,
 John

-- 
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] FTP and SSH

2008-06-04 Thread Arno Garrels
Fastream Technologies wrote:
 Well the idea of SSH is still encryption. It would be an addition to
 ICS-SSL, not to ICS--IMO.

SSH (Secure Shell) is available on nix platforms. Due to the lack of 
SSL SSH has been used in the past to tunnel unsecure FTP on those 
platforms. Today however most FTP server even in the Unix wourld do
support SSL as well. IMO the effort to implement an antiquated protocol, 
that is specific to the Unix platform, doesn't make much sense. 

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


[twsocket] Host lookup blocks the main thread

2008-06-04 Thread Éric Fleming Bonilha
Hello,

I´m having a strange problem with ICS
On our architecture we use TWSocket client components on separated threads 
because of lengthy operations so our main thread will not be blocked, but we 
are having such a strange problem, when our software tries to connect to an 
invalid host name (like the string test or abcabcabc) it will block the 
main thread for some seconds until the component receives the reponse of 
invalid host, is this behaviour normal to block the main thread?

Thanks a lot!
Éric
-- 
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] Not enough storage error in XSocketAllocateHWnd

2008-06-04 Thread Olivier Sannier
Olivier Sannier wrote:
 Arno Garrels wrote:
   
 Fastream Technologies wrote:

   
 
 Upgrading might be simpler than you think. Just rename ICSv5 folder,
 unzip and install v6 package and then rename all ICS unit names so
 that they start with OverbyteIcs
 
   
 Indeed it is easy, however if you have derived classes with overidden
 WndProc-methods and custom messages it's a little bit more complicated
 than just to rename unit names in the uses clause. Please read the 
 comments in OverbyteIcsWndControl.pas.
 

 Thanks for the information. I did moved to v6 and had to adapt a few 
 things (would have been nice if Disposed in TIcsWndControl had been 
 protected and not private) but it did not help at first.
 Why?
 Because as soon as all connected clients would disconnect, the handle 
 allocated for them would be released. And the next time a client comes 
 in, the handle cannot be created anymore because the Indy part of the 
 process has taken it.
 What I did was to instantiate a dummy TIcsWndControl component per 
 message pump thread instance, attach it to the thread and only release 
 it when the thread ends.
 Then I made the threads start at the beginning of the process instead of 
 on demand. There are only two of those threads, so that's not too much 
 of a hassle.
 This way the handle is created at the very start, when there are still 
 handles left for the process and is never released even if all clients 
 disconnect.

 Note that I created a dummy TIcsWndControl instance as it seems the 
 easiest way to do keep the handle opened, if you know of a better way, 
 please let me know.
   
Anyone?

-- 
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 And WebServices (SOAP)

2008-06-04 Thread DZ-Jay
Hello:
I'm sure this has been asked before but can anybody tell me if ICS 
Supports Web Services using SOAP, in particular the Document Literal 
format (Doc|Lit).  If so, is there anything special I should know about it?

Thanks,
dZ.
-- 
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