|
Good evening,
I have a script which work properly with a IO::Socket::INET. I'm trying to encrypt the communication using IO::Socket::SSL. After socket building, I wait for a connection with:
while (my $sock = $server->accept()) {
print ">New connection\n";
threads->new( \&perform, $sock, $self);
}
When the perform method runs, I can not access to $sock without having a Segementation Fault (then the script crash). The code of my subroutine is clean, if I replace subroutine call by the code, everything works properly... It really seems to be a problem passing the socket to the perform method.
How can I pass the socket to the subroutine???
Thank you very much :-)
|