Name
SPVM::Net::SSLeay::BIO - BIO data structure in OpenSSL
Description
Net::SSLeay::BIO class of SPVM represents BIO data structure in OpenSSL.
Usage
use Net::SSLeay::BIO;
Class Methods
new
static method new : Net::SSLeay::BIO ();
Creates a new Net::SSLeay::BIO object and returns its.
Implementation:
This method calls BIO_new function given the return value of BIO_s_mem()
as the first argument.
The pointer value of the new Net::SSLeay::BIO object is set to the return value of BIO_new
function.
Instance Methods
read
method read : int ($data : mutable string, $dlen : int = -1);
Attempts to read $dlen bytes from BIO
and places the data in $data by calling BIO_read function and returns its return value.
If $dlen is lower than 0, it is set to the length of $data.
Exceptions:
The $data must be defined. Otherwise an exception is thrown.
The $dlen must be lower than or equal to the length of the $data. Otherwise an exception is thrown.
If BIO_read failed, an exception is thrown with eval_error_id
set to the basic type ID of Net::SSLeay::Error class.
write
method write : int ($data : string, $dlen : int = -1);
Attempts to write $dlen bytes from $data to BIO
by calling BIO_write function and returns its return value.
If $dlen is lower than 0, it is set to the length of $data.
Exceptions:
The $data must be defined. Otherwise an exception is thrown.
The $dlen must be lower than or equal to the length of the $data. Otherwise an exception is thrown.
If BIO_write failed, an exception is thrown with eval_error_id
set to the basic type ID of Net::SSLeay::Error class.
DESTROY
method DESTROY : void ();
Frees BIO object by calling BIO_free function if no_free
flag of the instance is not a true value.
See Also
Copyright & License
Copyright (c) 2023 Yuki Kimoto
MIT License