Takeshi Miki > Hoppy-0.01005 > Hoppy::Room::Memory

Download:
Hoppy-0.01005.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Source  

NAME ^

Hoppy::Room::Memory - Room on memory. It manages users and their sessions.

SYNOPSIS ^

  use Hoppy;

  my $server = Hoppy->new;
  my $room = $server->room; # get room object from the Hoppy.

  # longin and logout are handled automatically.
  $room->login(...);
  $room->logout(...);

  # create or delete a new room.
  $room->create_room('hoge');
  $room->delete_room('hoge');

  # you can fetch user(s) object from any ID.
  my $user  = $room->fetch_user_from_user_id($user_id);
  my $user  = $room->fetch_user_from_session_id($session_id);
  my $users = $room->fetch_users_from_room_id($room_id);

DESCRIPTION ^

Room on memory. It manages users and their sessions.

METHODS ^

new

create_room($room_id);

delete_room($room_id);

login(\%args,$poe_object);

  %args = (
    user_id    => $user_id,
    session_id => $session_id,
    password   => $password,  #optional
    room_id    => $room_id,   #optional
  );

logout(\%args, $poe_object);

  %args = ( user_id => $user_id );

fetch_user_from_user_id($user_id)

fetch_user_from_session_id($session_id)

fetch_users_from_room_id($room_id)

AUTHOR ^

Takeshi Miki <miki@cpan.org>

LICENSE ^

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

SEE ALSO ^

syntax highlighting: