Yes I do enter the dialogue phase. Then when I attempt to start the socket I
end the dialogue phase by returning -1;
Thread or no thread the error still occurs.
I was trying to spawn off a new thread in the button_Click subroutine but
that new thread used to fail in the start_SSL() funtion.
Next I turned off threads, though threads seem to be pretty stable in perl
win32 - maybe because they piggy back onto the OS native threading model.
The button_Click subroutine disables and hides the main window (there is
only one window in the app). then it returns -1.
When it returns -1, the script proceeds to the statements after
Win32::GUI::Dialog;
Even here the start_SSL fails.
I'm using the latest versions of all modules. Just did a clean and fresh
install of Activeperl and other modules yesterday.
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.
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.
This list is really fabulous though. Trying to do something on win32 you
dont get treated as though you are from Mars! :)
----- 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