Name

SPVM::IO::Socket::INET - IPv4 Sockets

Usage

use IO::Socket::INET;

my $host = "google.com";
my $port = 80;
my $socket = IO::Socket::INET->new({
  PeerAddr => $host,
  PeerPort => $port
});

Description

IO::Socket::INET class in SPVM represents a IPv4 Socket.

Super Class

IO::Socket::IP

Class Methods

new

static method new : IO::Socket::INET ($options : object[] = undef);

This method is the same as SPVM::IO::Socket::IP#new method, but the Domain option is always set to AF_INET.

accept

method accept : IO::Socket::INET ($peer_ref : Sys::Socket::Sockaddr[] = undef);

This method is the same as accept method, but its return type is different.

Copyright & License

Copyright (c) 2023 Yuki Kimoto

MIT License