Marcus Ramberg > Convos-0.8002 > Convos::Loopback

Download:
Convos-0.8002.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Source  

NAME ^

Convos::Loopback - Loopback connection

DESCRIPTION ^

This class represents a loopback connection. That is a connection which is only visible internally to convos, and thus does not require a IRC server.

This module must be compatible with Mojo::IRC.

SYNOPSIS ^

  my $connection = Convos::Core::Connection->new(....);
  my $loopback = Convos::Loopback->new(connection => $connection);

  $loopback->connect(sub {
    my($loopback, $error) = @_;
    # ...
  });

ATTRIBUTES ^

server

Cannot be set. Will always return "loopback".

nick

Holds the nick.

user

Alias for "nick".

pass

for compat reasons

ioloop

Holds an instance of Mojo::IOLoop.

redis

Holds an instance of Mojo::Redis.

connection

Holds and instance of Convos::Core::Connection. Must be provided in constructor.

METHODS ^

new

Used to create a new object. "connection" is required parameter.

change_nick

Used to change "nick".

connect

  $self->connect($cb);

Will start subscribing to messages sent to this nick.

disconnect

Does nothing.

write

See "write" in Mojo::IRC.

AUTHOR ^

Jan Henning Thorsen - jhthorsen@cpan.org

syntax highlighting: