Name
SPVM::IO::Socket::INET - IPv4 Sockets
Usage
use IO::Socket::INET;
my $host = "google.com";
my $port = 80;
my $io_socket = IO::Socket::INET->new({
PeerAddr => $host,
PeerPort => $port
});
Description
The IO::Socket::INET class in SPVM has methods to create IPv4 Sockets.
Super Class
Class Methods
new
static method new : IO::Socket::INET ($options : object[] = undef);
Same as SPVM::IO::Socket::IP#new method, but the Domain
option is set to the return value of Sys::Socket::Constant#AF_INET method.
Options:
The options for IO::Socket#new method are available.
accept
method accept : IO::Socket::INET ($peer_ref : Sys::Socket::Sockaddr[] = undef);
Calls accept method of its super class given the argument given to this method and returns its return value.
Copyright & License
Copyright (c) 2023 Yuki Kimoto
MIT License