NAME
Evo::Net::Srv
VERSION
version 0.0208
SYNOPSYS
use Evo '-Net::Srv; -Loop *';
my $srv = Evo::Net::Srv::new();
my $listen_socket = $srv->srv_listen(ip => '*', port => 8080);
$srv->on(
srv_accept => sub($srv, $sock) {
my ($ip, $port) = $sock->io_remote;
say sprintf("New connection from %s[%s], [%s]", $ip, $port, scalar localtime);
}
);
loop_start;
Mostly for testing purposes. For writing servers, see Evo::Net::Srv::Role
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.