def _serve_client(self, sock, credentials):
     addrinfo = sock.getpeername()
     try:
         config = dict(self.protocol_config, credentials=credentials,
                       endpoints=(sock.getsockname(), addrinfo), logger=self.logger)
         conn = Connection(self.service, Channel(SocketStream(sock)),
                           config=config)
         conn.serve_all()
     finally:
         pass
Esempio n. 2
0
 def _serve_client(self, sock, credentials):
     h, p = sock.getpeername()
     self.logger.info("welcome %s:%s", h, p)
     try:
         config = dict(self.protocol_config, credentials = credentials)
         conn = Connection(self.service, Channel(SocketStream(sock)), 
             config = config, _lazy = True)
         conn._init_service()
         conn.serve_all()
     finally:
         self.logger.info("goodbye %s:%s", h, p)
Esempio n. 3
0
 def _serve_client(self, sock, credentials):
     addrinfo = sock.getpeername()
     if credentials:
         self.logger.info("welcome %s (%r)", addrinfo, credentials)
     else:
         self.logger.info("welcome %s", addrinfo)
     try:
         config = dict(self.protocol_config, credentials = credentials, 
             endpoints = (sock.getsockname(), addrinfo))
         conn = Connection(self.service, Channel(SocketStream(sock)),
             config = config, _lazy = True)
         conn._init_service()
         conn.serve_all()
     finally:
         self.logger.info("goodbye %s", addrinfo)
Esempio n. 4
0
 def _serve_client(self, sock, credentials):
     addrinfo = sock.getpeername()
     h = addrinfo[0]
     p = addrinfo[1]
     if credentials:
         self.logger.info("welcome [%s]:%s (%r)", h, p, credentials)
     else:
         self.logger.info("welcome [%s]:%s", h, p)
     try:
         config = dict(self.protocol_config, credentials = credentials)
         conn = Connection(self.service, Channel(SocketStream(sock)),
             config = config, _lazy = True)
         conn._init_service()
         conn.serve_all()
     finally:
         self.logger.info("goodbye [%s]:%s", h, p)
Esempio n. 5
0
 def _serve_client(self, sock, credentials):
     addrinfo = sock.getpeername()
     h = addrinfo[0]
     p = addrinfo[1]
     if credentials:
         self.logger.info("welcome [%s]:%s (%r)", h, p, credentials)
     else:
         self.logger.info("welcome [%s]:%s", h, p)
     try:
         config = dict(self.protocol_config,
                       credentials=credentials,
                       endpoints=(sock.getsockname(), addrinfo))
         conn = Connection(self.service,
                           Channel(SocketStream(sock)),
                           config=config,
                           _lazy=True)
         conn._init_service()
         conn.serve_all()
     finally:
         self.logger.info("goodbye [%s]:%s", h, p)