added "connected" method for stateful sessions
authormiker <miker@9efc2488-bf62-4759-914b-345cdb29e865>
Fri, 4 Nov 2005 21:32:45 +0000 (21:32 +0000)
committermiker <miker@9efc2488-bf62-4759-914b-345cdb29e865>
Fri, 4 Nov 2005 21:32:45 +0000 (21:32 +0000)
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@567 9efc2488-bf62-4759-914b-345cdb29e865

src/perlmods/OpenSRF/AppSession.pm

index 679fd16..8e0b484 100644 (file)
@@ -62,6 +62,10 @@ sub transport_connected {
        return $self->{peer_handle}->tcp_connected();
 }
 
+sub connected {
+       my $self = shift;
+       return $self->state == CONNECTED;
+}
 # ----------------------------------------------------------------------------
 # Clears the transport buffers
 # call this if you are not through with the sesssion, but you want