NAME

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

DESCRIPTION

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

These objects are typically created by a successfully connected POEx::IRC::Backend::Connector or an accepted connection to a POEx::IRC::Backend::Listener.

CONSUMES

This class consumes the following roles:

POEx::IRC::Backend::Role::HasWheel

POEx::IRC::Backend::Role::Socket

ATTRIBUTES

alarm_id

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

Predicate: has_alarm_id

rw attribute.

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 (for use by higher-level layers):

$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; for use by higher-level layers to help tag Connects.

rw attribute.

is_peer

Boolean true if the connection wheel has been marked as a peer; for use by higher-level layers to help tag Connects.

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

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

METHODS

get_socket

Returns the actual underlying socket handle, or undef if one is not open.

If this is a SSLified socket, the real handle is retrieved via "SSLify_GetSocket" in POE::Component::SSLify.

ssl_cipher

Returns the cipher in use by calling "SSLify_GetCipher" in POE::Component::SSLify, or the empty string if this is not an SSLified connection.

ssl_object

Returns the underlying Net::SSLeay object via "SSLify_GetSSL" in POE::Component::SSLify, or undef if this is not an SSLified connection.

AUTHOR

Jon Portnoy <avenj@cobaltirc.org>