Emmanuel E wrote:
Even here the start_SSL fails.
Can you make a script work without using any GUI (either Win32::GUI ot
Tk). If so, then we can investigate further. If not, then it is likely
a problem in Openssl/Net::SSLeay. The Win32::GUI code goes nowhere
near any of the socket stuff, so it's hard to imagine how Win32::GUI
could be responsible for this particular issue - but, as they say,
anything is possible.
Actually the problem might really be in Openssl and Net::SSLeay. but
folks on the openssl and net::ssleay side are not too interested in
getting it working properly on win32. SSLeay enabled perl scripts just
eat up memory on win32. But since I dont think i can accomplish much
by opening the SSLeay can of worms I just thought if there could be a
workaround on the GUI side.
As I say, if you can show that Win32::GUI is having some undesirable
interaction, then we can look further - but my suspicion is that this is
not a Win32::GUI issue.
Incidentally before switching to Win32::GUI, I attempted doing the
same stuff using Tk. While Tk is thread unsafe, even with a single
threaded script the failure always used to occur at start_SSL(). Tk
does have a Window->destroy function but calling that causes the
script to exit. I didnt find a workaround in Tk to destroy and return
to the script. Just checking out to see if it a GUI->destroy exists in
Win32::GUI.
The way you are returning to the script is correct - returning '-1' from
a callback in the dialog phase. Once back in your script, if you
undefine *ALL* variables that are holding Win32::GUI objects (e.g. undef
$window; etc.), then all destructors will get called by the perl
garbage collector, and all windows resources that Win32::GUI used will
be cleaned up. (There are DESTROY() methods on most Win32::GUI classes,
but I generally don't recommend calling them directly)
This list is really fabulous though. Trying to do something on win32
you dont get treated as though you are from Mars! :)
Good luck with solving your problem.
Rob.
----- Original Message ----- From: "Jeremy White" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <perl-win32-gui-users@lists.sourceforge.net>
Sent: Tuesday, July 19, 2005 10:03 PM
Subject: RE: [perl-win32-gui-users] SSLeay fails when GUI is initialized
Hi,
the start_SSL() function fails only if the GUI is initialized with
the error
- "SSL connect attempt failed".
If you haven't entered the dialogue phase there should be no reason
why you would get this error.
From a preliminary search I figured that Net::SSLeay (the underlying to
IO::Socket::SSL) needs a blocking socket to work.
Does Win32::GUI set some form of continuous interrupts or signals that
prevent Net::SSLeay from working in blocking mode?
Once your application has entered the dialogue phase, it sleeps until
an event is triggered (such as a mouse click on a button). If you
block on a socket, the main app can't process new events so your
application freeze's. The solution is to spawn a separate thread to
handle the socket communications, while the main thread handles the
GUI. To do threading in Perl, you are going to need a version of
5.8.x (and I would guess the later the better).
Cheers,
jez.
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users