| 1 | package SPVM::Sys::Socket::Sockaddr::In; | ||
| 2 | |||
| 3 | 1; | ||
| 4 | |||
| 5 | =head1 Name | ||
| 6 | |||
| 7 | SPVM::Sys::Socket::Sockaddr::In - struct sockaddr_in in the C language | ||
| 8 | |||
| 9 | =head1 Description | ||
| 10 | |||
| 11 | Sys::Socket::Sockaddr::In class in L<SPVM> represents L<struct sockaddr_in|https://linux.die.net/man/7/ip> in the C language. | ||
| 12 | |||
| 13 | =head1 Usage | ||
| 14 | |||
| 15 | use Sys::Socket::Sockaddr::In; | ||
| 16 | |||
| 17 | =head1 Details | ||
| 18 | |||
| 19 | This class is a pointer class. The pointer the instance has is set to a L<struct sockaddr_in|https://linux.die.net/man/7/ip> object. | ||
| 20 | |||
| 21 | =head1 Super Class | ||
| 22 | |||
| 23 | L<Sys::Socket::Sockaddr|SPVM::Sys::Socket::Sockaddr> | ||
| 24 | |||
| 25 | =head1 Class Methods | ||
| 26 | |||
| 27 | =head2 new | ||
| 28 | |||
| 29 | C<static method new : L<Sys::Socket::Sockaddr::In|SPVM::Sys::Socket::Sockaddr::In> ();> | ||
| 30 | |||
| 31 | Create a new L<Sys::Socket::Sockaddr::In|SPVM::Sys::Socket::Sockaddr::In> object. | ||
| 32 | |||
| 33 | =head1 Instance Methods | ||
| 34 | |||
| 35 | =head2 sa_family | ||
| 36 | |||
| 37 | C<method sa_family : int ()> | ||
| 38 | |||
| 39 | Returns C<sa_family>. | ||
| 40 | |||
| 41 | =head2 sin_family | ||
| 42 | |||
| 43 | C<method sin_family : int ();> | ||
| 44 | |||
| 45 | Returns C<sin_family>. | ||
| 46 | |||
| 47 | =head2 set_sin_family | ||
| 48 | |||
| 49 | C<method set_sin_family : void ($family : int);> | ||
| 50 | |||
| 51 | Sets C<sin_family>. | ||
| 52 | |||
| 53 | =head2 sin_addr | ||
| 54 | |||
| 55 | C<method sin_addr : L<Sys::Socket::In_addr|SPVM::Sys::Socket::In_addr> ();> | ||
| 56 | |||
| 57 | Copies C<sin_addr> and returns it. | ||
| 58 | |||
| 59 | =head2 set_sin_addr | ||
| 60 | |||
| 61 | C<method set_sin_addr : void ($address : L<Sys::Socket::In_addr|SPVM::Sys::Socket::In_addr>);> | ||
| 62 | |||
| 63 | Sets C<sin_addr>. | ||
| 64 | |||
| 65 | Exceptions: | ||
| 66 | |||
| 67 | The address must be defined. Otherwise an exception is thrown. | ||
| 68 | |||
| 69 | =head2 sin_port | ||
| 70 | |||
| 71 | C<method sin_port : int ();> | ||
| 72 | |||
| 73 | Returns C<sin_port>. | ||
| 74 | |||
| 75 | =head2 set_sin_port | ||
| 76 | |||
| 77 | C<method set_sin_port : void ($port : int);> | ||
| 78 | |||
| 79 | Sets C<sin_port>. | ||
| 80 | |||
| 81 | =head2 size | ||
| 82 | |||
| 83 | C<method size : int ()> | ||
| 84 | |||
| 85 | Returns the size of C<struct sockaddr_in>. | ||
| 86 | |||
| 87 | =head2 clone | ||
| 88 | |||
| 89 | C<method clone : L<Sys::Socket::Sockaddr::In|SPVM::Sys::Socket::Sockaddr::In> ()> | ||
| 90 | |||
| 91 | Clones this instance and returns it. | ||
| 92 | |||
| 93 | =head2 DESTROY | ||
| 94 | |||
| 95 | C<method DESTROY : void ();> | ||
| 96 | |||
| 97 | The destructor. | ||
| 98 | |||
| 99 | =head1 See Also | ||
| 100 | |||
| 101 | =over 2 | ||
| 102 | |||
| 103 | =item * L<Sys::Socket::Sockaddr|SPVM::Sys::Socket::Sockaddr> | ||
| 104 | |||
| 105 | =item * L<Sys|SPVM::Sys> | ||
| 106 | |||
| 107 | =back | ||
| 108 | |||
| 109 | =head1 Copyright & License | ||
| 110 | |||
| 111 | Copyright (c) 2023 Yuki Kimoto | ||
| 112 | |||
| 113 | MIT License | ||
| 114 |