Hi, i hope this is still kind of current ^^'

I'm trying to take the HTTP::Daemon::SSL and make it threaded. The SSL Daemon itself runs. The threaded Daemon itself runs... but guess what... the threaded SSL daemon doesnt -.- Is it even possible to du such a thing? Here is what I got:

my $d = HTTP::Daemon::SSL->new(LocalAddr => localhost, LocalPort => 90 +90, ReuseAddr => 1) || die "Couldn't start server! Reason: $!"; print "Serving as (".$$.") on ".$d->sockhost.":".$d->sockport."\n"; while (my $c = $d->accept) { threads->create(\&handle, $c)->detach(); } sub handle { my $c = shift; my $r = $c->get_request; if ($r) { ... } else { $c->send_error(); } $c->close; undef($c); }

doing this with the HTTP::Daemon works fine. If I take the SSL-Version I get segmentation faults. Guess it has to do with the accept() of the connection.

Another strange thing is that the SSL Daemon always terminates when there is a non-SSL connection (attemping to connect via http) shouldnt be the rule should it?

Hope someone can haelp me, thx in advance.

In reply to Re^2: A simple web server with HTTP::Daemon and threads by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.