| 1 | package POEx::IRC::Backend::Connect; | ||||||||||||||||||||||||||||||||||||||||||
| 2 | 2 | $POEx::IRC::Backend::Connect::VERSION = '0.030002'; | |||||||||||||||||||||||||||||||||||||||||
| 3 | 2 | ▶ | use strictures 2; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 4 | 2 | ▶ | use Types::Standard -all; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 5 | |||||||||||||||||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||||||||||||||||
| 7 | 2 | ▶ | use Moo; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 8 | 2 | with 'POEx::IRC::Backend::Role::Socket', | |||||||||||||||||||||||||||||||||||||||||
| 9 | 'POEx::IRC::Backend::Role::CheckAvail'; | ||||||||||||||||||||||||||||||||||||||||||
| 10 | |||||||||||||||||||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||||||||||||||||
| 12 | has alarm_id => ( | ||||||||||||||||||||||||||||||||||||||||||
| 13 | ## Idle alarm ID. | ||||||||||||||||||||||||||||||||||||||||||
| 14 | lazy => 1, | ||||||||||||||||||||||||||||||||||||||||||
| 15 | is => 'rw', | ||||||||||||||||||||||||||||||||||||||||||
| 16 | predicate => 'has_alarm_id', | ||||||||||||||||||||||||||||||||||||||||||
| 17 | 1 | ▶ | default => sub { 0 }, | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 18 | 2 | ); | |||||||||||||||||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||||||||||||||||
| 20 | has compressed => ( | ||||||||||||||||||||||||||||||||||||||||||
| 21 | ## zlib filter added. | ||||||||||||||||||||||||||||||||||||||||||
| 22 | lazy => 1, | ||||||||||||||||||||||||||||||||||||||||||
| 23 | is => 'rwp', | ||||||||||||||||||||||||||||||||||||||||||
| 24 | isa => Bool, | ||||||||||||||||||||||||||||||||||||||||||
| 25 | writer => 'set_compressed', | ||||||||||||||||||||||||||||||||||||||||||
| 26 | 2 | ▶ | default => sub { !!0 }, | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 27 | 2 | ); | |||||||||||||||||||||||||||||||||||||||||
| 28 | |||||||||||||||||||||||||||||||||||||||||||
| 29 | has idle => ( | ||||||||||||||||||||||||||||||||||||||||||
| 30 | ## Idle delay. | ||||||||||||||||||||||||||||||||||||||||||
| 31 | lazy => 1, | ||||||||||||||||||||||||||||||||||||||||||
| 32 | is => 'ro', | ||||||||||||||||||||||||||||||||||||||||||
| 33 | isa => StrictNum, | ||||||||||||||||||||||||||||||||||||||||||
| 34 | 1 | ▶ | default => sub { 180 }, | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 35 | 2 | ); | |||||||||||||||||||||||||||||||||||||||||
| 36 | |||||||||||||||||||||||||||||||||||||||||||
| 37 | has is_client => ( | ||||||||||||||||||||||||||||||||||||||||||
| 38 | lazy => 1, | ||||||||||||||||||||||||||||||||||||||||||
| 39 | is => 'rw', | ||||||||||||||||||||||||||||||||||||||||||
| 40 | isa => Bool, | ||||||||||||||||||||||||||||||||||||||||||
| 41 | 1 | ▶ | default => sub { !!0 }, | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 42 | 2 | ); | |||||||||||||||||||||||||||||||||||||||||
| 43 | |||||||||||||||||||||||||||||||||||||||||||
| 44 | has is_peer => ( | ||||||||||||||||||||||||||||||||||||||||||
| 45 | lazy => 1, | ||||||||||||||||||||||||||||||||||||||||||
| 46 | is => 'rw', | ||||||||||||||||||||||||||||||||||||||||||
| 47 | isa => Bool, | ||||||||||||||||||||||||||||||||||||||||||
| 48 | 1 | ▶ | default => sub { !!0 }, | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 49 | 2 | ); | |||||||||||||||||||||||||||||||||||||||||
| 50 | |||||||||||||||||||||||||||||||||||||||||||
| 51 | has is_disconnecting => ( | ||||||||||||||||||||||||||||||||||||||||||
| 52 | ## Bool or string (disconnect message) | ||||||||||||||||||||||||||||||||||||||||||
| 53 | is => 'rw', | ||||||||||||||||||||||||||||||||||||||||||
| 54 | isa => (Bool | Str), | ||||||||||||||||||||||||||||||||||||||||||
| 55 | 3 | ▶ | default => sub { !!0 }, | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 56 | 2 | ); | |||||||||||||||||||||||||||||||||||||||||
| 57 | |||||||||||||||||||||||||||||||||||||||||||
| 58 | has is_pending_compress => ( | ||||||||||||||||||||||||||||||||||||||||||
| 59 | ## Wheel needs zlib filter after a socket flush. | ||||||||||||||||||||||||||||||||||||||||||
| 60 | is => 'rw', | ||||||||||||||||||||||||||||||||||||||||||
| 61 | isa => Bool, | ||||||||||||||||||||||||||||||||||||||||||
| 62 | 3 | ▶ | default => sub { !!0 }, | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 63 | 2 | ); | |||||||||||||||||||||||||||||||||||||||||
| 64 | |||||||||||||||||||||||||||||||||||||||||||
| 65 | 2 | has peeraddr => ( | |||||||||||||||||||||||||||||||||||||||||
| 66 | required => 1, | ||||||||||||||||||||||||||||||||||||||||||
| 67 | isa => Str, | ||||||||||||||||||||||||||||||||||||||||||
| 68 | is => 'ro', | ||||||||||||||||||||||||||||||||||||||||||
| 69 | writer => 'set_peeraddr', | ||||||||||||||||||||||||||||||||||||||||||
| 70 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 71 | |||||||||||||||||||||||||||||||||||||||||||
| 72 | 2 | has peerport => ( | |||||||||||||||||||||||||||||||||||||||||
| 73 | required => 1, | ||||||||||||||||||||||||||||||||||||||||||
| 74 | is => 'ro', | ||||||||||||||||||||||||||||||||||||||||||
| 75 | writer => 'set_peerport', | ||||||||||||||||||||||||||||||||||||||||||
| 76 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 77 | |||||||||||||||||||||||||||||||||||||||||||
| 78 | has ping_pending => ( | ||||||||||||||||||||||||||||||||||||||||||
| 79 | lazy => 1, | ||||||||||||||||||||||||||||||||||||||||||
| 80 | is => 'rw', | ||||||||||||||||||||||||||||||||||||||||||
| 81 | 1 | ▶ | default => sub { 0 }, | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 82 | 2 | ); | |||||||||||||||||||||||||||||||||||||||||
| 83 | |||||||||||||||||||||||||||||||||||||||||||
| 84 | has seen => ( | ||||||||||||||||||||||||||||||||||||||||||
| 85 | ## TS of last activity on this Connect. | ||||||||||||||||||||||||||||||||||||||||||
| 86 | lazy => 1, | ||||||||||||||||||||||||||||||||||||||||||
| 87 | is => 'rw', | ||||||||||||||||||||||||||||||||||||||||||
| 88 | 1 | ▶ | default => sub { 0 }, | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 89 | 2 | ); | |||||||||||||||||||||||||||||||||||||||||
| 90 | |||||||||||||||||||||||||||||||||||||||||||
| 91 | 2 | has sockaddr => ( | |||||||||||||||||||||||||||||||||||||||||
| 92 | required => 1, | ||||||||||||||||||||||||||||||||||||||||||
| 93 | isa => Str, | ||||||||||||||||||||||||||||||||||||||||||
| 94 | is => 'ro', | ||||||||||||||||||||||||||||||||||||||||||
| 95 | writer => 'set_sockaddr', | ||||||||||||||||||||||||||||||||||||||||||
| 96 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 97 | |||||||||||||||||||||||||||||||||||||||||||
| 98 | 2 | has sockport => ( | |||||||||||||||||||||||||||||||||||||||||
| 99 | required => 1, | ||||||||||||||||||||||||||||||||||||||||||
| 100 | is => 'ro', | ||||||||||||||||||||||||||||||||||||||||||
| 101 | writer => 'set_sockport', | ||||||||||||||||||||||||||||||||||||||||||
| 102 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 103 | |||||||||||||||||||||||||||||||||||||||||||
| 104 | |||||||||||||||||||||||||||||||||||||||||||
| 105 | sub ssl_object { | ||||||||||||||||||||||||||||||||||||||||||
| 106 | 1 | ▶ | my ($self) = @_; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
ssl_object: called CC=4 SCAR=20.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 107 | return undef | ||||||||||||||||||||||||||||||||||||||||||
| 108 | 1 | ▶ | unless $self->ssl | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%2/6
$self->ssl and $self->has_ssl_support and $self->has_wheel
$self->ssl and $self->has_ssl_support
MC/DC0%0/3
$self->ssl and $self->has_ssl_support and $self->has_wheel
$self->ssl
$self->has_ssl_support
$self->has_wheel
Truth table25%1/4
A and B and C
A= $self->sslB= $self->has_ssl_supportC= $self->has_wheel
| |||||||||||||||||||||||||||||||||||||||||||
| 109 | and $self->has_ssl_support | ||||||||||||||||||||||||||||||||||||||||||
| 110 | and $self->has_wheel; | ||||||||||||||||||||||||||||||||||||||||||
| 111 | |||||||||||||||||||||||||||||||||||||||||||
| 112 | 0 | POE::Component::SSLify::SSLify_GetSSL( $self->wheel->get_output_handle ) | |||||||||||||||||||||||||||||||||||||||||
| 113 | } | ||||||||||||||||||||||||||||||||||||||||||
| 114 | |||||||||||||||||||||||||||||||||||||||||||
| 115 | sub ssl_cipher { | ||||||||||||||||||||||||||||||||||||||||||
| 116 | 1 | ▶ | my ($self) = @_; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
ssl_cipher: called CC=4 SCAR=20.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 117 | 1 | ▶ | return '' | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%2/6
$self->ssl and $self->has_ssl_support and $self->has_wheel
$self->ssl and $self->has_ssl_support
MC/DC0%0/3
$self->ssl and $self->has_ssl_support and $self->has_wheel
$self->ssl
$self->has_ssl_support
$self->has_wheel
Truth table25%1/4
A and B and C
A= $self->sslB= $self->has_ssl_supportC= $self->has_wheel
| |||||||||||||||||||||||||||||||||||||||||||
| 118 | unless $self->ssl | ||||||||||||||||||||||||||||||||||||||||||
| 119 | and $self->has_ssl_support | ||||||||||||||||||||||||||||||||||||||||||
| 120 | and $self->has_wheel; | ||||||||||||||||||||||||||||||||||||||||||
| 121 | |||||||||||||||||||||||||||||||||||||||||||
| 122 | 0 | POE::Component::SSLify::SSLify_GetCipher( $self->wheel->get_output_handle ) | |||||||||||||||||||||||||||||||||||||||||
| 123 | } | ||||||||||||||||||||||||||||||||||||||||||
| 124 | |||||||||||||||||||||||||||||||||||||||||||
| 125 | sub get_socket { | ||||||||||||||||||||||||||||||||||||||||||
| 126 | 1 | ▶ | my ($self) = @_; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_socket: called CC=3 SCAR=11.7
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 127 | 1 | ▶ | return undef unless $self->has_wheel; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 128 | 1 | ▶ | $self->ssl ? | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 129 | POE::Component::SSLify::SSLify_GetSocket( $self->wheel->get_output_handle ) | ||||||||||||||||||||||||||||||||||||||||||
| 130 | : $self->wheel->get_output_handle | ||||||||||||||||||||||||||||||||||||||||||
| 131 | } | ||||||||||||||||||||||||||||||||||||||||||
| 132 | |||||||||||||||||||||||||||||||||||||||||||
| 133 | |||||||||||||||||||||||||||||||||||||||||||
| 134 | 2 | 1; | |||||||||||||||||||||||||||||||||||||||||
| 135 | |||||||||||||||||||||||||||||||||||||||||||
| 136 | =pod | ||||||||||||||||||||||||||||||||||||||||||
| 137 | |||||||||||||||||||||||||||||||||||||||||||
| 138 | =for Pod::Coverage has_\w+ set_\w+ | ||||||||||||||||||||||||||||||||||||||||||
| 139 | |||||||||||||||||||||||||||||||||||||||||||
| 140 | =head1 NAME | ||||||||||||||||||||||||||||||||||||||||||
| 141 | |||||||||||||||||||||||||||||||||||||||||||
| 142 | POEx::IRC::Backend::Connect - A connected IRC socket | ||||||||||||||||||||||||||||||||||||||||||
| 143 | |||||||||||||||||||||||||||||||||||||||||||
| 144 | =head1 DESCRIPTION | ||||||||||||||||||||||||||||||||||||||||||
| 145 | |||||||||||||||||||||||||||||||||||||||||||
| 146 | These objects contain details regarding connected socket | ||||||||||||||||||||||||||||||||||||||||||
| 147 | L<POE::Wheel::ReadWrite> wheels managed by L<POEx::IRC::Backend>. | ||||||||||||||||||||||||||||||||||||||||||
| 148 | |||||||||||||||||||||||||||||||||||||||||||
| 149 | These objects are typically created by a successfully connected | ||||||||||||||||||||||||||||||||||||||||||
| 150 | L<POEx::IRC::Backend::Connector> or an accepted connection to a | ||||||||||||||||||||||||||||||||||||||||||
| 151 | L<POEx::IRC::Backend::Listener>. | ||||||||||||||||||||||||||||||||||||||||||
| 152 | |||||||||||||||||||||||||||||||||||||||||||
| 153 | =head2 CONSUMES | ||||||||||||||||||||||||||||||||||||||||||
| 154 | |||||||||||||||||||||||||||||||||||||||||||
| 155 | This class consumes the following roles: | ||||||||||||||||||||||||||||||||||||||||||
| 156 | |||||||||||||||||||||||||||||||||||||||||||
| 157 | L<POEx::IRC::Backend::Role::HasWheel> | ||||||||||||||||||||||||||||||||||||||||||
| 158 | |||||||||||||||||||||||||||||||||||||||||||
| 159 | L<POEx::IRC::Backend::Role::Socket> | ||||||||||||||||||||||||||||||||||||||||||
| 160 | |||||||||||||||||||||||||||||||||||||||||||
| 161 | =head2 ATTRIBUTES | ||||||||||||||||||||||||||||||||||||||||||
| 162 | |||||||||||||||||||||||||||||||||||||||||||
| 163 | =head3 alarm_id | ||||||||||||||||||||||||||||||||||||||||||
| 164 | |||||||||||||||||||||||||||||||||||||||||||
| 165 | Connected socket wheels normally have a POE alarm ID attached for an idle | ||||||||||||||||||||||||||||||||||||||||||
| 166 | timer. | ||||||||||||||||||||||||||||||||||||||||||
| 167 | |||||||||||||||||||||||||||||||||||||||||||
| 168 | Predicate: C<has_alarm_id> | ||||||||||||||||||||||||||||||||||||||||||
| 169 | |||||||||||||||||||||||||||||||||||||||||||
| 170 | B<rw> attribute. | ||||||||||||||||||||||||||||||||||||||||||
| 171 | |||||||||||||||||||||||||||||||||||||||||||
| 172 | =head3 compressed | ||||||||||||||||||||||||||||||||||||||||||
| 173 | |||||||||||||||||||||||||||||||||||||||||||
| 174 | Boolean true if the Zlib filter has been added. | ||||||||||||||||||||||||||||||||||||||||||
| 175 | |||||||||||||||||||||||||||||||||||||||||||
| 176 | See also: L<POEx::IRC::Backend/set_compressed_link> | ||||||||||||||||||||||||||||||||||||||||||
| 177 | |||||||||||||||||||||||||||||||||||||||||||
| 178 | =head3 set_compressed | ||||||||||||||||||||||||||||||||||||||||||
| 179 | |||||||||||||||||||||||||||||||||||||||||||
| 180 | Change the boolean value of the L</compressed> attrib. | ||||||||||||||||||||||||||||||||||||||||||
| 181 | |||||||||||||||||||||||||||||||||||||||||||
| 182 | =head3 idle | ||||||||||||||||||||||||||||||||||||||||||
| 183 | |||||||||||||||||||||||||||||||||||||||||||
| 184 | Idle time used for connection check alarms. | ||||||||||||||||||||||||||||||||||||||||||
| 185 | |||||||||||||||||||||||||||||||||||||||||||
| 186 | See also: L</ping_pending>, L<POEx::IRC::Backend/ircsock_connection_idle> | ||||||||||||||||||||||||||||||||||||||||||
| 187 | |||||||||||||||||||||||||||||||||||||||||||
| 188 | =head3 is_disconnecting | ||||||||||||||||||||||||||||||||||||||||||
| 189 | |||||||||||||||||||||||||||||||||||||||||||
| 190 | Boolean false if the Connect is not in a disconnecting state; if it is | ||||||||||||||||||||||||||||||||||||||||||
| 191 | true, it is the disconnect message (for use by higher-level layers): | ||||||||||||||||||||||||||||||||||||||||||
| 192 | |||||||||||||||||||||||||||||||||||||||||||
| 193 | $obj->is_disconnecting("Client quit") | ||||||||||||||||||||||||||||||||||||||||||
| 194 | |||||||||||||||||||||||||||||||||||||||||||
| 195 | B<rw> attribute. | ||||||||||||||||||||||||||||||||||||||||||
| 196 | |||||||||||||||||||||||||||||||||||||||||||
| 197 | See also: L<POEx::IRC::Backend/disconnect> | ||||||||||||||||||||||||||||||||||||||||||
| 198 | |||||||||||||||||||||||||||||||||||||||||||
| 199 | =head3 is_client | ||||||||||||||||||||||||||||||||||||||||||
| 200 | |||||||||||||||||||||||||||||||||||||||||||
| 201 | Boolean true if the connection wheel has been marked as a client; for use by | ||||||||||||||||||||||||||||||||||||||||||
| 202 | higher-level layers to help tag Connects. | ||||||||||||||||||||||||||||||||||||||||||
| 203 | |||||||||||||||||||||||||||||||||||||||||||
| 204 | B<rw> attribute. | ||||||||||||||||||||||||||||||||||||||||||
| 205 | |||||||||||||||||||||||||||||||||||||||||||
| 206 | =head3 is_peer | ||||||||||||||||||||||||||||||||||||||||||
| 207 | |||||||||||||||||||||||||||||||||||||||||||
| 208 | Boolean true if the connection wheel has been marked as a peer; for use by | ||||||||||||||||||||||||||||||||||||||||||
| 209 | higher-level layers to help tag Connects. | ||||||||||||||||||||||||||||||||||||||||||
| 210 | |||||||||||||||||||||||||||||||||||||||||||
| 211 | B<rw> attribute. | ||||||||||||||||||||||||||||||||||||||||||
| 212 | |||||||||||||||||||||||||||||||||||||||||||
| 213 | =head3 is_pending_compress | ||||||||||||||||||||||||||||||||||||||||||
| 214 | |||||||||||||||||||||||||||||||||||||||||||
| 215 | Primarily for internal use; boolean true if the Wheel needs a Zlib filter on | ||||||||||||||||||||||||||||||||||||||||||
| 216 | next buffer flush. | ||||||||||||||||||||||||||||||||||||||||||
| 217 | |||||||||||||||||||||||||||||||||||||||||||
| 218 | B<rw> attribute. | ||||||||||||||||||||||||||||||||||||||||||
| 219 | |||||||||||||||||||||||||||||||||||||||||||
| 220 | =head3 ping_pending | ||||||||||||||||||||||||||||||||||||||||||
| 221 | |||||||||||||||||||||||||||||||||||||||||||
| 222 | The C<ping_pending> attribute can be used to manage standard IRC | ||||||||||||||||||||||||||||||||||||||||||
| 223 | PING/PONG heartbeating; a server can call C<< $conn->ping_pending(1) >> upon | ||||||||||||||||||||||||||||||||||||||||||
| 224 | dispatching a PING to a client (because of an C<ircsock_connection_idle> | ||||||||||||||||||||||||||||||||||||||||||
| 225 | event, for example) and C<< $conn->ping_pending(0) >> when a | ||||||||||||||||||||||||||||||||||||||||||
| 226 | response is received. | ||||||||||||||||||||||||||||||||||||||||||
| 227 | |||||||||||||||||||||||||||||||||||||||||||
| 228 | If C<< $conn->ping_pending >> is true on the next C<ircsock_connection_idle>, | ||||||||||||||||||||||||||||||||||||||||||
| 229 | the client can be considered to have timed out and your server-side C<Backend> | ||||||||||||||||||||||||||||||||||||||||||
| 230 | can issue a disconnect; this emulates standard IRCD behavior. | ||||||||||||||||||||||||||||||||||||||||||
| 231 | |||||||||||||||||||||||||||||||||||||||||||
| 232 | B<rw> attribute. | ||||||||||||||||||||||||||||||||||||||||||
| 233 | |||||||||||||||||||||||||||||||||||||||||||
| 234 | See also: L<POEx::IRC::Backend/ircsock_connection_idle> | ||||||||||||||||||||||||||||||||||||||||||
| 235 | |||||||||||||||||||||||||||||||||||||||||||
| 236 | =head3 peeraddr | ||||||||||||||||||||||||||||||||||||||||||
| 237 | |||||||||||||||||||||||||||||||||||||||||||
| 238 | The remote peer address. | ||||||||||||||||||||||||||||||||||||||||||
| 239 | |||||||||||||||||||||||||||||||||||||||||||
| 240 | Writer: C<set_peeraddr> | ||||||||||||||||||||||||||||||||||||||||||
| 241 | |||||||||||||||||||||||||||||||||||||||||||
| 242 | =head3 peerport | ||||||||||||||||||||||||||||||||||||||||||
| 243 | |||||||||||||||||||||||||||||||||||||||||||
| 244 | The remote peer port. | ||||||||||||||||||||||||||||||||||||||||||
| 245 | |||||||||||||||||||||||||||||||||||||||||||
| 246 | Writer: C<set_peerport> | ||||||||||||||||||||||||||||||||||||||||||
| 247 | |||||||||||||||||||||||||||||||||||||||||||
| 248 | =head3 seen | ||||||||||||||||||||||||||||||||||||||||||
| 249 | |||||||||||||||||||||||||||||||||||||||||||
| 250 | Timestamp of last socket activity; updated by L<POEx::IRC::Backend> when | ||||||||||||||||||||||||||||||||||||||||||
| 251 | traffic is seen from this Connect. | ||||||||||||||||||||||||||||||||||||||||||
| 252 | |||||||||||||||||||||||||||||||||||||||||||
| 253 | B<rw> attribute. | ||||||||||||||||||||||||||||||||||||||||||
| 254 | |||||||||||||||||||||||||||||||||||||||||||
| 255 | =head3 sockaddr | ||||||||||||||||||||||||||||||||||||||||||
| 256 | |||||||||||||||||||||||||||||||||||||||||||
| 257 | Our socket address. | ||||||||||||||||||||||||||||||||||||||||||
| 258 | |||||||||||||||||||||||||||||||||||||||||||
| 259 | Writer: C<set_sockaddr> | ||||||||||||||||||||||||||||||||||||||||||
| 260 | |||||||||||||||||||||||||||||||||||||||||||
| 261 | =head3 sockport | ||||||||||||||||||||||||||||||||||||||||||
| 262 | |||||||||||||||||||||||||||||||||||||||||||
| 263 | Our socket port. | ||||||||||||||||||||||||||||||||||||||||||
| 264 | |||||||||||||||||||||||||||||||||||||||||||
| 265 | Writer: C<set_sockport> | ||||||||||||||||||||||||||||||||||||||||||
| 266 | |||||||||||||||||||||||||||||||||||||||||||
| 267 | =head2 METHODS | ||||||||||||||||||||||||||||||||||||||||||
| 268 | |||||||||||||||||||||||||||||||||||||||||||
| 269 | =head3 get_socket | ||||||||||||||||||||||||||||||||||||||||||
| 270 | |||||||||||||||||||||||||||||||||||||||||||
| 271 | Returns the actual underlying socket handle, or undef if one is not open. | ||||||||||||||||||||||||||||||||||||||||||
| 272 | |||||||||||||||||||||||||||||||||||||||||||
| 273 | If this is a SSLified socket, the real handle is retrieved via | ||||||||||||||||||||||||||||||||||||||||||
| 274 | L<POE::Component::SSLify/SSLify_GetSocket>. | ||||||||||||||||||||||||||||||||||||||||||
| 275 | |||||||||||||||||||||||||||||||||||||||||||
| 276 | =head3 ssl_cipher | ||||||||||||||||||||||||||||||||||||||||||
| 277 | |||||||||||||||||||||||||||||||||||||||||||
| 278 | Returns the cipher in use by calling | ||||||||||||||||||||||||||||||||||||||||||
| 279 | L<POE::Component::SSLify/SSLify_GetCipher>, or the empty string if this is not | ||||||||||||||||||||||||||||||||||||||||||
| 280 | an SSLified connection. | ||||||||||||||||||||||||||||||||||||||||||
| 281 | |||||||||||||||||||||||||||||||||||||||||||
| 282 | =head3 ssl_object | ||||||||||||||||||||||||||||||||||||||||||
| 283 | |||||||||||||||||||||||||||||||||||||||||||
| 284 | Returns the underlying L<Net::SSLeay> object via | ||||||||||||||||||||||||||||||||||||||||||
| 285 | L<POE::Component::SSLify/SSLify_GetSSL>, or undef if this is not an SSLified | ||||||||||||||||||||||||||||||||||||||||||
| 286 | connection. | ||||||||||||||||||||||||||||||||||||||||||
| 287 | |||||||||||||||||||||||||||||||||||||||||||
| 288 | =head1 AUTHOR | ||||||||||||||||||||||||||||||||||||||||||
| 289 | |||||||||||||||||||||||||||||||||||||||||||
| 290 | Jon Portnoy <avenj@cobaltirc.org> | ||||||||||||||||||||||||||||||||||||||||||
| 291 | |||||||||||||||||||||||||||||||||||||||||||
| 292 | =cut | ||||||||||||||||||||||||||||||||||||||||||