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


POE-Component-Server-Bayeux documentation  | view source Contained in the POE-Component-Server-Bayeux distribution.

Index


NAME

Top

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

DESCRIPTION

Top

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

USAGE

Top

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

Top

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

AUTHOR

Top

Eric Waters <ewaters@uarc.com>


POE-Component-Server-Bayeux documentation  | view source Contained in the POE-Component-Server-Bayeux distribution.