code: def _state_connecting(self):
          
  
          def responseReceived(protocol):
              self.makeConnection(protocol)
              if self._state == 'aborting':
                  self._toState('disconnecting')
              else:
                  self._toState('connected')
  
          def trapError(failure):
              self._toState('error', failure)
  
          def onEntry(entry):
              if self.delegate:
                  try:
                      self.delegate(entry)
                  except:
                      log.err()
              else:
                  pass
  
          d = self.api(onEntry, self.args)
          d.addCallback(responseReceived)
          d.addErrback(trapError)
docs: A connection is being started.
  
          A succesful attempt results in the state C{'connected'} when the
          first response from Twitter has been received. Transitioning
          to the state C{'aborting'} will cause an immediate disconnect instead,
          by transitioning to C{'disconnecting'}.
  
          Errors will cause a transition to the C{'error'} state.