NAME
Evo::Net::Socket
VERSION
version 0.0199
SYNOPSYS
my $sock = Evo::Net::Socket::new()->socket_open();
$sock->socket_reuseaddr(1)->socket_listen(100);
Socket doesn't have any attached data in this role, so you can safely bless it to another package with Evo::Net::Socket::Role role
METHODS
Opens socket just like socket
. If already opened, dies
my $sock = Evo::Net::Socket::new()->socket_open(AF_INET6, SOCK_STREAM, IPPROTO_TCP);
socket_local
socket_remote
my ($ip, $port) = $sock->socket_remote;
($ip, $port) = $sock->socket_local;
More frienly results than getpeername
and getsockname
socket_accept
Instead of saddr return a new socket and initiate with the init
method of the derived class
Info
say $sock->socket_reuseaddr(1)->socket_reuseaddr; # 1
read only
socket_domain
socket_type
socket_protocol
read/write
socket_reuseaddr
socket_reuseport
socket_nodelay
socket_rcvbuf
socket_sndbuf
non_blocking
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.