SPVM::Sys::Poll::PollfdArray - Array of struct pollfd in C language
struct pollfd
C language
use Sys::Poll::PollfdArray; my $pollfds = Sys::Poll::PollfdArray->new(1024);
Sys::Poll::PollfdArray is the class for the array of struct pollfd in C language.
Sys::Poll::PollfdArray
This is a pointer class.
has length : ro int;
The length of the array.
static method new : Sys::Poll::PollfdArray ($length : int);
Create a new Sys::Poll::PollfdArray object with the length.
method DESTROY : void ();
The destructor.
method length : int ();
Get the lenght of the array.
method fd : int ($index : int);
Get fd of the position specifed by the index.
fd
The index must be greater than or equal to 0. Otherwise an exception will be thrown.
The index must be less than the length of the file descripters. Otherwise an exception will be thrown.
method set_fd : void ($index : int, $fd : int);
Set fd of the position specifed by the index.
method events : int ($index : int);
Get events of the position specifed by the index.
events
See Sys::Poll::PollfdArray about the constant values of events.
method set_events : void ($index : int, $events : int);
Set events of the position specifed by the index.
method revents : int ($index : int);
Get revents of the position specifed by the index.
revents
method set_revents : void ($index : int, $revents : int);
Set revents of the position specifed by the index.
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.