• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

lib/Sys/H17-Dec-2012-341192

t/H17-Dec-2012-191156

CHANGESH A D17-Dec-201291 64

MANIFESTH A D17-Dec-2012146 1110

META.ymlH A D17-Dec-2012603 2423

Makefile.PLH A D17-Dec-2012921 3416

README.podH A D17-Dec-20121.8 KiB8847

README.pod

1=head1 NAME
2
3Sys::Syscall - access system calls that Perl doesn't normally provide access to
4
5=head1 SYNOPSIS
6
7  use Sys::Syscall;
8
9=head1 DESCRIPTION
10
11Use epoll, sendfile, from Perl.  Mostly Linux-only support now, but
12more syscalls/OSes planned for future.
13
14=head1 Exports
15
16Nothing by default.
17
18May export: sendfile epoll_ctl epoll_create epoll_wait EPOLLIN EPOLLOUT EPOLLERR EPOLLHUP EPOLL_CTL_ADD  EPOLL_CTL_DEL EPOLL_CTL_MOD
19
20Export tags:  :epoll and :sendfile
21
22=head1 Functions
23
24=head2 epoll support
25
26=over 4
27
28=item $ok = epoll_defined()
29
30Returns true if epoll might be available.  (caller must still test with epoll_create)
31
32=item $epfd = epoll_create([ $start_size ])
33
34Create a new epoll filedescriptor.  Returns -1 if epoll isn't available.
35
36=item $rv = epoll_ctl($epfd, $op, $fd, $events)
37
38See manpage for epoll_ctl
39
40=item $count = epoll_wait($epfd, $max_events, $timeout, $arrayref)
41
42See manpage for epoll_wait.  $arrayref is an arrayref to be modified
43with the items returned.  The values put into $arrayref are arrayrefs
44of [$fd, $state].
45
46=back
47
48=head2 sendfile support
49
50=over 4
51
52=item $ok = sendfile_defined()
53
54Returns true if sendfile should work on this operating system.
55
56=item $sent = sendfile($sock_fd, $file_fd, $max_send)
57
58Sends up to $max_send bytes from $file_fd to $sock_fd.  Returns bytes
59actually sent, or -1 on error.
60
61=back
62
63=head1 COPYRIGHT
64
65This module is Copyright (c) 2005 Six Apart, Ltd.
66
67All rights reserved.
68
69You may distribute under the terms of either the GNU General Public
70License or the Artistic License, as specified in the Perl README file.
71If you need more liberal licensing terms, please contact the
72maintainer.
73
74=head1 Contributing
75
76Want to contribute?  See:
77
78  L<http://contributing.appspot.com/sys-syscall>
79
80=head1 WARRANTY
81
82This is free software. IT COMES WITHOUT WARRANTY OF ANY KIND.
83
84=head1 AUTHORS
85
86Brad Fitzpatrick <brad@danga.com>
87
88