parameters: (self, c)
docstring: Handle a new connection
docstring_summary: Handle a new connection
docstring_tokens: Handle a new connection
function: def handle_request(self, c):
          '''
          Handle a new connection
          '''
          funcname = result = request = None
          try:
              connection.deliver_challenge(c, self.authkey)
              connection.answer_challenge(c, self.authkey)
              request = c.recv()
              ignore, funcname, args, kwds = request
              assert funcname in self.public, '%r unrecognized' % funcname
              func = getattr(self, funcname)
          except Exception:
              msg = ('#TRACEBACK', format_exc())
          else:
              try:
                  result = func(c, *args, **kwds)
              except Exception:
                  msg = ('#TRACEBACK', format_exc())
              else:
                  msg = ('#RETURN', result)
          try:
              c.send(msg)
          except Exception, e:
              try:
                  c.send(('#TRACEBACK', format_exc()))
              except Exception:
                  pass
              util.info('Failure to send message: %r', msg)
              util.info(' ... request was %r', request)
              util.info(' ... exception was %r', e)
  
          c.close()
function_tokens: def handle_request ( self , c ) : funcname = result = request = None try : connection . deliver_challenge ( c , self . authkey ) connection . answer_challenge ( c , self . authkey ) request = c . recv ( ) ignore , funcname , args , kwds = request assert funcname in self . public , '%r unrecognized' % funcname func = getattr ( self , funcname ) except Exception : msg = ( '#TRACEBACK' , format_exc ( ) ) else : try : result = func ( c , * args , * * kwds ) except Exception : msg = ( '#TRACEBACK' , format_exc ( ) ) else : msg = ( '#RETURN' , result ) try : c . send ( msg ) except Exception , e : try : c . send ( ( '#TRACEBACK' , format_exc ( ) ) ) except Exception : pass util . info ( 'Failure to send message: %r' , msg ) util . info ( ' ... request was %r' , request ) util . info ( ' ... exception was %r' , e ) c . close ( )