From: miker Date: Fri, 4 Nov 2005 21:32:45 +0000 (+0000) Subject: added "connected" method for stateful sessions X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=1b6bbdfab3dbc50845c1d730f2688b20ad401e3c;p=opensrf%2Fbjwebb.git added "connected" method for stateful sessions git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@567 9efc2488-bf62-4759-914b-345cdb29e865 --- diff --git a/src/perlmods/OpenSRF/AppSession.pm b/src/perlmods/OpenSRF/AppSession.pm index 679fd16..8e0b484 100644 --- a/src/perlmods/OpenSRF/AppSession.pm +++ b/src/perlmods/OpenSRF/AppSession.pm @@ -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