SPVM::Sys::Socket::Sockaddr::In - struct sockaddr_in in the C language
The Sys::Socket::Sockaddr::In class in SPVM represents struct sockaddr_in in the C language.
use Sys::Socket::Sockaddr::In;
This class is a pointer class. The pointer the instance has is set to a struct sockaddr_in object.
Sys::Socket::Sockaddr
static method new : Sys::Socket::Sockaddr::In ();
Create a new Sys::Socket::Sockaddr::In object.
method DESTROY : void ();
The destructor.
method sa_family : int ()
Returns sa_family.
sa_family
method sin_family : int ();
Returns sin_family.
sin_family
method set_sin_family : void ($family : int);
Sets sin_family.
method sin_addr : Sys::Socket::In_addr ();
Copies sin_addr and returns it.
sin_addr
method set_sin_addr : void ($address : Sys::Socket::In_addr);
Sets sin_addr.
Exceptions:
The address must be defined. Otherwise an exception is thrown.
method sin_port : int ();
Returns sin_port.
sin_port
method set_sin_port : void ($port : int);
Sets sin_port.
method size : int ()
Returns the size of struct sockaddr_in.
struct sockaddr_in
method clone : Sys::Socket::Sockaddr::In ()
Clones this instance and returns it.
Copyright (c) 2023 Yuki Kimoto
MIT License
To install SPVM::Sys, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SPVM::Sys
CPAN shell
perl -MCPAN -e shell install SPVM::Sys
For more information on module installation, please visit the detailed CPAN module installation guide.