POE::C...Client(3pm)

๐Ÿ“ฆ
version 0.04 ยท 2 versions
, in fedora 43

๐Ÿ’– POE::C...Client ๐Ÿ’–

okay so this is the manual page for POE::Component::Server::Bayeux::Client, bestie โ€” a lil object that represents one single client of the server. It lives in the User Contributed Perl Documentation section, and honestly? It's giving backstage-pass energy. ๐ŸŽ€


โœจ NAME โœจ

POE::Component::Server::Bayeux::Client โ€” an object representing a single client of the server. One client. One object. main character energy, fr fr. ๐Ÿ‘‘


๐ŸŒธ DESCRIPTION ๐ŸŒธ

Used internally by POE::Component::Server::Bayeux. So like, this isn't the thing you're supposed to be poking at directly โ€” it's the behind-the-scenes bestie doing the work while the server takes the credit. ๐Ÿ’…


๐Ÿฆ‹ USAGE ๐Ÿฆ‹

๐Ÿ’ซ new (...)

Constructs a new client object. It takes these arguments, no cap:

  • server_heap (required) โ€” the server's heap object. Yes bestie, it's required, do not skip it, the vibe check will fail. ๐Ÿšจ
  • request โ€” a POE::Component::Server::Bayeux::Request object representing an HTTP-connected client. ๐ŸŒ
  • id โ€” the clientId. If you don't hand one over, it generates one using Data::UUID. Slay, UUIDs. โœจ
  • session โ€” for locally connected clients, this is the POE session alias or ID to post back to. ๐Ÿ“ฎ

๐Ÿ’… METHODS ๐Ÿ’…

disconnect ()

Disconnects. That's it. That's the method. iconic. ๐Ÿ’€โœจ

complete_poll ()

Completes an active poll if there is one. No poll? No problem. ๐Ÿซถ

message_acl ($message)

Called with a POE::Component::Server::Bayeux::Message, and the client is supposed to evaluate whether the message is invalid within the context of the client โ€” as in, it performs an authorization check. If there's an error, the message gets its is_error() field set with the error. So like, it's the bouncer at the club door. ๐Ÿšช๐Ÿ”

is_subscribed ($channel)

Returns a boolean of whether the client is subscribed to the literal channel you passed in. Not a vibe, not a maybe โ€” literal. ๐Ÿ’ฏ

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 back when this client subscribed to the channel. The structure of the message is the same as Bayeux '5.2. Deliver Event message'. ๐Ÿ“จ๐Ÿฆ‹

check_timeout ()

Checks the last time an HTTP-connected client performed connected, and removes the client if it's stale โ€” according to the server arg ConnectTimeout. Okay so it's literally a wellness check but for connections. ๐Ÿ˜ญโฐ

flush_queue ()

Flushes the queue of messages, if there is any, and only if the client is currently connected. Only used for HTTP-connected clients. Don't come for me if your client isn't connected, bestie. ๐Ÿšซ๐Ÿ“ฌ

logger ()

Returns a reference to the server's logger. ๐Ÿชต

server_config ()

Returns the server's args. Simple. Clean. Ate. ๐Ÿ“


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> ๐Ÿซถ


and that's the whole page, bestie โ€” no cap, every flag and every method accounted for. This was perl v5.42.0, dated 2025-07-25, and it's officially a wrap. Byeee! ๐Ÿ’…๐ŸŽ€๐Ÿฆ‹

๐Ÿ“ฆ where this page comes from