NAME

POEx::IRC::Backend::Connect - A connected IRC socket

SYNOPSIS

Typically created by POEx::IRC::Backend to represent an established connection.

DESCRIPTION

These objects contain details regarding connected socket POE::Wheel::ReadWrite wheels managed by POEx::IRC::Backend.

Consumes POEx::IRC::Backend::Role::HasWheel and adds the following attributes:

alarm_id

Connected socket wheels normally have a POE alarm ID attached for an idle timer.

Predicate: has_alarm_id

rw attribute.

args

Arbitrary metadata attached to this connection; by default, any args attached to a POEx::IRC::Backend::Connector that spawns a POEx::IRC::Backend::Connect are passed along.

Predicate: has_args

compressed

Boolean true if the Zlib filter has been added.

See also: "set_compressed_link" in POEx::IRC::Backend

set_compressed

Change the boolean value of the "compressed" attrib.

idle

Idle time used for connection check alarms.

See also: "ping_pending", "ircsock_connection_idle" in POEx::IRC::Backend

is_disconnecting

Boolean false if the Connect is not in a disconnecting state; if it is true, it is the disconnect message:

$obj->is_disconnecting("Client quit")

rw attribute.

See also: "disconnect" in POEx::IRC::Backend

is_client

Boolean true if the connection wheel has been marked as a client.

rw attribute.

is_peer

Boolean true if the connection wheel has been marked as a peer.

rw attribute.

is_pending_compress

Primarily for internal use; boolean true if the Wheel needs a Zlib filter on next buffer flush.

rw attribute.

ping_pending

The ping_pending attribute can be used to manage standard IRC PING/PONG heartbeating; a server can call $conn->ping_pending(1) upon dispatching a PING to a client (because of an ircsock_connection_idle event, for example) and $conn->ping_pending(0) when a response is received.

If $conn->ping_pending is true on the next ircsock_connection_idle, the client can be considered to have timed out and your server-side Backend can issue a disconnect; this emulates standard IRCD behavior.

rw attribute.

See also: "ircsock_connection_idle" in POEx::IRC::Backend

peeraddr

The remote peer address.

Writer: set_peeraddr

peerport

The remote peer port.

Writer: set_peerport

protocol

The protocol in use (4 or 6); set by POEx::IRC::Backend at connection time.

seen

Timestamp of last socket activity; updated by POEx::IRC::Backend when traffic is seen from this Connect.

rw attribute.

sockaddr

Our socket address.

Writer: set_sockaddr

sockport

Our socket port.

Writer: set_sockport

AUTHOR

Jon Portnoy <avenj@cobaltirc.org>