Name
SPVM::IO::Socket::IP::Import::IPv6 - Importable Methods for IPv6
Description
IO::Socket::IP::Import::IPv6 interface in SPVM provides importable methods for IPv6.
Usage
use IO::Socket::IP::Import::IPv6;
Interface Methods
sockname
method sockname : Sys::Socket::Sockaddr ();
Returns Sys::Socket::Sockaddr object containing a local address and a local port.
The type of the returned value is Sys::Socket::Sockaddr::In6.
This method must be implemented by the class that declares this interface.
peername
method peername : Sys::Socket::Sockaddr ();
Returns a Sys::Socket::Sockaddr object containing a remote address and a local port.
The type of the returned value is Sys::Socket::Sockaddr::In6.
This method must be implemented by the class that declares this interface.
Instance Methods
sockaddr
method sockaddr : Sys::Socket::In_addr_base ();
Returns a local address.
The type of the returned object is Sys::Socket::In6_addr.
sockhost
method sockhost : string ();
Returns a local host name.
sockport
method sockport : int ();
Returns a local port.
peeraddr
method peeraddr : Sys::Socket::In_addr_base ();
Returns a remote address.
The type of the returned object is Sys::Socket::In6_addr.
peerhost
method peerhost : string ();
Returns a remote host name.
peerport
method peerport : int ();
Returns a remote port.
create_sockaddr
method create_sockaddr : Sys::Socket::Sockaddr ($address : string, $port : int);
Creates a Sys::Socket::Sockaddr object given the address $address and the port $port.
$address is allowed to be a domain name, a host name, an IP address.
The type of the returned value is Sys::Socket::Sockaddr::In6.
Implementation:
This method resolves $address using Net::DNS::Native#getaddrinfo method in non-blocking way and creates a Sys::Socket::Sockaddr::In6 object from the resolved IP address and $port.
Copyright & License
Copyright (c) 2024 Yuki Kimoto
MIT License