~patrickb/IO-Socket-TLSViaAsync

Synchronous TLS sockets
Let's see if badges work on sr.ht
Correct version number in Changes
Correct IO::Socket::Async::SSL dependency version

refs

main
browse  log 

clone

read-only
https://git.sr.ht/~patrickb/IO-Socket-TLSViaAsync
read/write
git@git.sr.ht:~patrickb/IO-Socket-TLSViaAsync

You can also use your local clone with git send-email.

#NAME

IO::Socket::TLSViaAsync

Interface for TLS connections

Sparky

#Synopsis

use IO::Socket::TLSViaAsync;
my $ssl = IO::Socket::TLSViaAsync.new(:host<example.com>, :port(443));
if $ssl.print("GET / HTTP/1.1\r\n\r\n") {
    say $ssl.recv;
}

#Description

This module provides an interface for TLS connections. It's a drop in replacement of IO::Socket::INET.

Technically it's a wrapper around the IO::Socket::Async::SSL module. The new, connect and listen methods forward their named arguments to the connect and listen methods in IO::Socket::Async::SSL respectively.

#Limitations

It's not possible to initialize an instance of IO::Socket::TLSViaAsync with an IO::Socket::INET object, because IO::Socket::TLSViaAsync is based on IO::Socket::Async::SSL which in turn is based on IO::Socket::Async, which is incompatible with IO::Socket.

#AUTHOR

Patrick Böker patrick.boeker@posteo.de

#License

This module is distributed under the terms of the Artistic License 2.0.