NAME Test::TCP - testing TCP program SYNOPSIS use Test::TCP; my $server = Test::TCP->new( listen => 1, code => sub { my $socket = shift; ... }, ); my $client = MyClient->new(host => '127.0.0.1', port => $server->port); undef $server; # kill child process on DESTROY If using a server that can only accept a port number, e.g. memcached: use Test::TCP; my $memcached = Test::TCP->new( code => sub { my
![Test::TCP](https://cdn-ak-scissors.b.st-hatena.com/image/square/c4a607b5430575638fd9a7f233e073d867af4bb7/height=288;version=1;width=512/https%3A%2F%2Fmetacpan.org%2Fstatic%2Fimages%2Fdots.png)