MATSUNO★Tokuhiro > Test-TCP-0.02 > Test::TCP

Download:
Test-TCP-0.02.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Module Version: 0.02   Source   Latest Release: Test-TCP-0.15

NAME ^

Test::TCP - testing TCP program

SYNOPSIS ^

    use Test::TCP;
    my $port = empty_port();
    test_tcp(
        client => sub {
            my $port = shift;
            # send request to the server
        },
        server => sub {
            my $port = shift;
            # run server
        },
    );

DESCRIPTION ^

Test::TCP is test utilities for TCP/IP program.

METHODS ^

empty_port
    my $port = empty_port();

search empty port

test_tcp
    test_tcp(
        client => sub {
            my $port = shift;
            # send request to the server
        },
        server => sub {
            my $port = shift;
            # run server
        },
        # optional
        port => 8080
    );
wait_port
    wait_port(8080);

Waits for a particular port is available

AUTHOR ^

Tokuhiro Matsuno <tokuhirom@gmail.com>

SEE ALSO ^

LICENSE ^

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.