Name

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

Usage

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

Description

Sys::Socket::Sockaddr::In is the class for the struct sockaddr_in in C language.

This is a pointer class.

Inheritance

This class inherits 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 ()

Gets sa_family. This is the overriden method of the sa_family method in the Sys::Socket::Sockaddr class.

sin_family

method sin_family : int ();

Gets sin_family.

set_sin_family

method set_sin_family : void ($family : int);

Sets sin_family.

copy_sin_addr

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

Copies sin_addr. This is a Sys::Socket::In_addr object.

set_sin_addr

method set_sin_addr : void ($address : Sys::Socket::In_addr);

Sets sin_addr. This is a Sys::Socket::In_addr object.

sin_port

method sin_port : int ();

Gets sin_port.

set_sin_port

method set_sin_port : void ($port : int);

Sets sin_port.

size

method size : int ()

The size of struct sockaddr_in.

clone

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

Clones this object.

Copyright & License

Copyright (c) 2023 Yuki Kimoto

MIT License