-# Copyright (C) 2018 all contributors <meta@public-inbox.org>
+# Copyright (C) 2018-2019 all contributors <meta@public-inbox.org>
# License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
use strict;
use warnings;
close $fh or die "close($pi_config): $!";
}
- %opts = (
- LocalAddr => '127.0.0.1',
- ReuseAddr => 1,
- Proto => 'tcp',
- Listen => 1024,
- );
- my $sock = IO::Socket::INET->new(%opts);
-
+ my $sock = tcp_server();
ok($sock, 'sock created');
my $cmd = [ $nntpd, '-W0' ];
$pid = spawn_listener({ PI_CONFIG => $pi_config }, $cmd, [$sock]);