Closed ap closed 11 years ago
this is awesome!
I would love to see a release with this....
Now with tests stolen from Twiggy::TLS.
Now with the improved command line parsing code broken out as a separate preparatory commit.
I’ve broken out a few further commits. Each of them improves style a bit by itself, and each of them can be accepted independently of the commits after it. This also leaves it obvious how little added code the SSL support itself really involves.
The previous patches all used ::Proto::SSLEAY because ::Proto::SSL was discouraged in Net::Server 0.9 series due to limitations in using IO::Socket::SSL. In 2.0 series those limitations were lifted. And the Net::SSLeay wrapping in IO::Socket::SSL seems more mature than that in Net::Server::Proto::SSLEAY.
So unlike ::Proto::SSLEAY, using ::Proto::SSL as a drop-in replacement for ::Proto::TCP seems to Just Work. I did some light testing using this patch and did not spot issues.
But please put it through its paces.
This patch also takes advantage of improved Net::Server 2.0 config interface (allows passing an array of hashes for the
port
key) to make the command line parsing code much nicer to skim.Cc @og01 @und3f @alladdin @exodist @dpetrov