NAME

Evo::Io

VERSION

version 0.0240

io_open

# 'r', 'w', 'rw', or constants from Fcntl
my $io = io_open('r', $filename);

Open file and make it non blocking using sysopen, you can use shortcuts "r", "rw", "w"

io_open_anon

Open temp file, make it non_blocking, using open $fh, $extr, undef

io_socket

Create a socket. Make it v6only for IPv6 and nodelay for TCP. By default AF_INET6

io_listen

Bind to port and listen. Skip port to listen on random available port. Provide '::' or '0.0.0.0' to listen all IPv6 or IPv4

my $serv = io_listen(ip => '::', port => 8080);
my $serv = io_listen(ip => '::', port => 8080, backlog => 10, reuseport => 1);

Pay attention that io_v6only will be set for ipv6 addresses. Also io_reuseaddr will be settled to true

AUTHOR

alexbyk.com

COPYRIGHT AND LICENSE

This software is copyright (c) 2016 by alexbyk.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.