Eric Waters > POE-Component-Server-Bayeux-0.03 > POE::Component::Server::Bayeux::Client

Download:
POE-Component-Server-Bayeux-0.03.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Source   Latest Release: POE-Component-Server-Bayeux-0.04

NAME ^

POE::Component::Server::Bayeux::Client - An object representing a single client of the server

DESCRIPTION ^

Used internally by POE::Component::Server::Bayeux.

USAGE ^

new (...)

Arguments:

server_heap (required)

The server's heap object

request

A POE::Component::Server::Bayeux::Request object representing an HTTP-connected client.

id

The clientId. If not given, generates one using Data::UUID.

session

For locally connected clients, the POE session alias or ID to post back to.

METHODS ^

disconnect ()

complete_poll ()

Completes an active poll if there is one

message_acl ($message)

Called with a POE::Component::Server::Bayeux::Message, the client is to evaluate wether the message is invalid within the context of the client - as in, perform an authorization check. If there's an error, the message will have it's is_error() field set with the error.

is_subscribed ($channel)

Returns boolean of wether the client is subscribed to the literal channel provided

send_message ($message, $subscription_args)

Sends, or queues, the message to the client. $subscription_args is the same hashref that was passed to the server's subscribe() method when this client subscribed to the channel. Structure of the message is same as Bayeux '5.2. Deliver Event message'.

check_timeout ()

Checks last time HTTP-connected client performed connected, and removes client if it's stale (according to server arg ConnectTimeout).

flush_queue ()

Flush the queue of messages, if there is any, and only if client is currently connected. Only used for HTTP-connected clients.

logger ()

Return a reference to the servers logger.

server_config ()

Returns the server's args

COPYRIGHT ^

Copyright (c) 2008 Eric Waters and XMission LLC (http://www.xmission.com/). All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

The full text of the license can be found in the LICENSE file included with this module.

AUTHOR ^

Eric Waters <ewaters@uarc.com>

syntax highlighting: