NAME
IO::SocketAlarm::Util
EXPORTS
socketalarm
$alarm= socketalarm($socket);
$alarm= socketalarm($socket, @actions);
$alarm= socketalarm($socket, $event_mask, @actions);
This is a shortcut for IO::SocketAlarm->new:
$alarm= IO::SocketAlarm->new(
socket => $socket,
events => $event_mask,
actions => \@actions,
);
is_socket
$bool= is_socket($thing);
Returns true if and only if the parameter is a socket at the operating system level. (for instance, the socket must not have been closed, which would release that file descriptor) It permits file handles or file descriptor numbers.
get_fd_table_str
$str= get_fd_table(); // scans fd 0..1023
$str= get_fd_table($max_fd); // specify your own upper limit
Return a human-readable string describing each open file descriptor. This is just for debugging, and relies on /proc/self/fd/ symlinks for anything other than sockets. For sockets, it prints the bound name and peer name of the socket.
Event Constants
- EVENT_SHUT
- EVENT_EOF
- EVENT_IN
- EVENT_PRI
- EVENT_CLOSE
VERSION
version 0.001
AUTHOR
Michael Conrad <mike@nrdvana.net>
COPYRIGHT AND LICENSE
This software is copyright (c) 2024 by IntelliTree Solutions.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.