AOLserver-CtrlPort

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

    It is useful for creating test suites for AOLserver applications which
    can be controlled via the control port.

    To configure AOLserver's control port, use settings similar to the
    following ones:

        ns_section "ns/server/${servername}/module/nscp"
            ns_param address myhostname
            ns_param port 3334
            ns_param echopassword 1
            ns_param cpcmdlogging 1

        ns_section "ns/server/${servername}/module/nscp/users"
            ns_param user "username:3G5/H31peci.o:"
                               # That's "username:password"

        ns_section "ns/server/${servername}/modules"
            ns_param nscp ${bindir}/nscp.so

    This lets AOLserver enable the control port on server "myhostname" on
    port 3334. Authentication is on, the username is "username" and the

README  view on Meta::CPAN

            The port AOLserver is listening to for control port commands.

        Host
            The control port "address" as defined in the configuration.

        Timeout
            Number of seconds after which the client will time out if the
            server doesn't send a response.

        User
            User name for control port login defaults to the empty string
            for non-protected control ports.

        Password
            Password for control port login defaults to the empty string for
            non-protected control ports.

    $conn->send_cmds("$cmd1\ncmd2\n...")
        Send one or more commands, separated by newlines, AOLserver's
        control port. The method will return the server's response as a
        string. Typically, this will look like

            $out = $conn->send_cmds(<<EOT);
                info tclversion
                info commands

lib/AOLserver/CtrlPort.pm  view on Meta::CPAN

It is useful for creating test suites for AOLserver applications which
can be controlled via the control port. 

To configure AOLserver's control port, use settings similar to the following
ones:

    ns_section "ns/server/${servername}/module/nscp"
        ns_param address myhostname
        ns_param port 3334
        ns_param echopassword 1
        ns_param cpcmdlogging 1

    ns_section "ns/server/${servername}/module/nscp/users"
        ns_param user "username:3G5/H31peci.o:"
                           # That's "username:password"

    ns_section "ns/server/${servername}/modules"
        ns_param nscp ${bindir}/nscp.so

This lets AOLserver enable the control port on server C<myhostname> on port
3334. Authentication is on, the username is C<username> and the

lib/AOLserver/CtrlPort.pm  view on Meta::CPAN


The control port C<address> as defined in the configuration.

=item Timeout

Number of seconds after which the client will time out if the
server doesn't send a response.

=item User

User name for control port login defaults to the empty string
for non-protected control ports.

=item Password

Password for control port login defaults to the empty string
for non-protected control ports.

=back

=cut

############################################################
sub new {
############################################################
    my ($class, @options) = @_;

lib/AOLserver/CtrlPort.pm  view on Meta::CPAN

    delete $options{Password};

    my $t = Net::Telnet->new(%options);

    DEBUG("Connecting to port=$options{Host}:$options{Port}");
    $t->open();

    my $self = { telnet => $t,
               };

    $t->login("", "");

    DEBUG("Waiting for prompt");
    $t->waitfor();

    bless $self, $class;
}

=item $conn->send_cmds("$cmd1\ncmd2\n...")

Send one or more commands, separated by newlines, AOLserver's



( run in 1.006 second using v1.01-cache-2.11-cpan-49f99fa48dc )