lightmelody

changeset 702:4c7a5e58a5a8 objectify

ssl prop and is_open
author Mayank Singh <mayanks43@gmail.com>
date Mon, 31 Dec 2012 15:01:22 -0600
parents f3af48b569ed
children bd758193b873
files src/Connection.gs
diffstat 1 files changed, 11 insertions(+), 5 deletions(-) [+]
line diff
     1.1 --- a/src/Connection.gs	Mon Dec 31 15:38:22 2012 -0500
     1.2 +++ b/src/Connection.gs	Mon Dec 31 15:01:22 2012 -0600
     1.3 @@ -62,10 +62,9 @@
     1.4      state : State
     1.5      queue : MessageQueue
     1.6      // socket
     1.7 -    // ssl
     1.8 -    // proxy
     1.9 +    _ssl : SSL
    1.10      _proxy : Proxy
    1.11 -    // parser
    1.12 +    //parser
    1.13  
    1.14      // Registered Message Handlers
    1.15      id_handlers : dict of string, MessageHandler
    1.16 @@ -247,7 +246,10 @@
    1.17  
    1.18      def is_open () : bool
    1.19          return self.state >= State.OPEN
    1.20 -
    1.21 +        
    1.22 +        
    1.23 +    def is_authenticated () : bool 
    1.24 +        return self.state >= State.AUTHENTICATED
    1.25  
    1.26      def open (function : ResultFunction#) : bool raises Error
    1.27          // Bail if the connection is already open
    1.28 @@ -442,7 +444,11 @@
    1.29      prop proxy : Proxy?
    1.30          get
    1.31              return _proxy
    1.32 -    // TODO prop ssl
    1.33 +    prop ssl : SSL?
    1.34 +        get
    1.35 +            return _ssl
    1.36 +        set
    1.37 +            self._ssl = value
    1.38  
    1.39      //////////////////////////////////////////////////////////////////////////
    1.40      // MessageHandlerEntry