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
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)
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)
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)
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)