Name
SPVM::Net::DNS::Native - Short Description
Description
Net::DNS::Native class in SPVM has methods to perform non-blocking getaddrinfo operation.
Usage
use Net::DNS::Native;
my $dns = Net::DNS::Native->new;
my $domain = "google.com";
my $service = (string)undef;
my $hints = Sys::Socket::Addrinfo->new;
$hints->set_ai_family(SOCKET->AF_INET);
my $res_ref = new Sys::Socket::AddrinfoLinkedList[1];
$dns->getaddrinfo($domain, $service, $hints, $res_ref);
Class Methods
new
static method new : Net::DNS::Native ();
Creates a new Net::DNS::Native object and returns it.
Instance Methods
getaddrinfo
method getaddrinfo : void ($node : string, $service : string, $hints : Sys::Socket::Addrinfo, $res_ref : Sys::Socket::AddrinfoLinkedList[]);
Performs non-blocking getaddrinfo operation.
Implementation:
Thie methos creates a goroutine. The goroutine creates a thread that performs getaddrinfo operation.
The caller gorouine waits for the goroutine to be finised and transfers the control to the scheduler.
See Also
Porting
This class is a Perl's Net::DNS::Native porting to SPVM.
Copyright & License
Copyright (c) 2024 Yuki Kimoto
MIT License