The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

Name

SPVM::Sys::Socket::Sockaddr::In - struct sockaddr_in in the C language

Description

The Sys::Socket::Sockaddr::In class in SPVM represents struct sockaddr_in in the C language.

Usage

  use Sys::Socket::Sockaddr::In;

Details

This class is a pointer class. The pointer the instance has is set to a struct sockaddr_in object.

Inheritance

Sys::Socket::Sockaddr

Class Methods

new

static method new : Sys::Socket::Sockaddr::In ();

Create a new Sys::Socket::Sockaddr::In object.

Instance Methods

DESTROY

method DESTROY : void ();

The destructor.

sa_family

method sa_family : int ()

Returns sa_family.

sin_family

method sin_family : int ();

Returns sin_family.

set_sin_family

method set_sin_family : void ($family : int);

Sets sin_family.

sin_addr

method sin_addr : Sys::Socket::In_addr ();

Copies sin_addr and returns it.

set_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.

sin_port

method sin_port : int ();

Returns sin_port.

set_sin_port

method set_sin_port : void ($port : int);

Sets sin_port.

size

method size : int ()

Returns the size of struct sockaddr_in.

clone

method clone : Sys::Socket::Sockaddr::In ()

Clones this instance and returns it.

Copyright & License

Copyright (c) 2023 Yuki Kimoto

MIT License