Name
SPVM::IO::Socket::SSL - Sockets for SSL.
Description
This class is highly experimental and not yet implemented completly and not tested well and not yet documented.
IO::Socket::SSL class in SPVM has methods for SSL sockets.
Usage
use IO::Socket::SSL;
# Client
my $client_socket = IO::Socket::SSL->new({
PeerAddr => "www.google.com:443"
});
# Server
my $server_socket = IO::Socket::SSL->new({
Listen => 10,
});
$server_socket->accept;
Super Class
Fields
ssl
has ssl : Net::SSLeay;
SSL_version
has SSL_version : string;
SSL_verify_mode
has SSL_verify_mode : int;
SSL_hostname
has SSL_hostname : string;
SSL_cipher_list
has SSL_cipher_list : string;
SSL_ciphersuites
has SSL_ciphersuites : string;
SSL_check_crl
has SSL_check_crl : int;
SSL_crl_file
has SSL_crl_file : string;
SSL_passwd_cb
has SSL_passwd_cb : Net::SSLeay::Callback::PemPasswd;
SSL_server
has SSL_server : int;
SSL_server_specified
has SSL_server_specified : int;
SSL_npn_protocols
has SSL_npn_protocols : string[];
SSL_alpn_protocols
has SSL_alpn_protocols : string[];
SSL_ticket_keycb
has SSL_ticket_keycb : Net::SSLeay::Callback::TlsextTicketKey;
Class Methods
new
static method new : IO::Socket::SSL ($options : object[] = undef);
Instance Methods
option_names
protected method option_names : string[] ();
init
protected method init : void ($options : object[] = undef);
Options:
SSL_version : string
SSL_verify_mode : Int
SSL_hostname : string
SSL_cipher_list : string
SSL_ciphersuites : string
SSL_check_crl : int
SSL_crl_file : string
SSL_passwd_cb : Net::SSLeay::Callback::PemPasswd
SSL_server : int
SSL_npn_protocols : string[]
SSL_alpn_protocols : string[]
SSL_ticket_keycb : Net::SSLeay::Callback::TlsextTicketKey
configure
protected method configure : void ();
configure_SSL
protected method configure_SSL : void ();
connect_SSL
protected method connect_SSL : void ();
accept_SSL
private method accept_SSL : void ();
accept
method accept : IO::Socket::SSL ($peer_ref : Sys::Socket::Sockaddr[] = undef);
read
method read : int ($buffer : mutable string, $length : int = -1, $offset : int = 0);
write
method write : int ($buffer : string, $length : int = -1, $offset : int = 0);
close
method close : void ();
stat
method stat : Sys::IO::Stat ();
die "stat method is not allowed in IO::Scoekt::SSL."; }
send
method send : int ($buffer : string, $flags : int = 0, $length : int = -1, $offset : int = 0);
sendto
method sendto : int ($buffer : string, $flags : int, $to : Sys::Socket::Sockaddr, $length : int = -1, $offset : int = 0);
recv
method recv : int ($buffer : mutable string, $length : int = -1, $flags : int = 0, $offset : int = 0);
recvfrom
method recvfrom : int ($buffer : mutable string, $length : int, $flags : int, $from_ref : Sys::Socket::Sockaddr[], $offset : int = 0);
Repository
SPVM::IO::Socket::SSL - Github
Author
Yuki Kimoto kimoto.yuki@gmail.com
Copyright & License
Copyright (c) 2024 Yuki Kimoto
MIT License