1# test EPROTONOSUPPORT for splicing unix sockets 2 3use strict; 4use warnings; 5use IO::Socket::UNIX; 6use BSD::Socket::Splice "SO_SPLICE"; 7 8our %args = ( 9 errno => 'EPROTONOSUPPORT', 10 func => sub { 11 my $s = IO::Socket::UNIX->new( 12 Type => SOCK_STREAM, 13 ) or die "socket failed: $!"; 14 15 my $ss = IO::Socket::UNIX->new( 16 Type => SOCK_STREAM, 17 ) or die "socket splice failed: $!"; 18 19 $s->setsockopt(SOL_SOCKET, SO_SPLICE, pack('i', $ss->fileno())) 20 and die "splice unix sockets succeeded"; 21 }, 22); 23