(self, sock)
return Connection(self.service, Channel(SocketStream(sock)), config=config)
Authenticate a client and if it succees, wraps the socket in a connection object.
        Note that this code is cut and paste from the rpyc internals and may have to be
        changed if rpyc evolves
Authenticate a client and if it succees, wraps the socket in a connection object.
        Note that this code is cut and paste from the rpyc internals and may have to be
        changed if rpyc evolves
Authenticate a client and if it succees wraps the socket in a connection object . Note that this code is cut and paste from the rpyc internals and may have to be changed if rpyc evolves
def _authenticate_and_build_connection(self, sock):
        '''Authenticate a client and if it succees, wraps the socket in a connection object.
        Note that this code is cut and paste from the rpyc internals and may have to be
        changed if rpyc evolves'''
        # authenticate
        if self.authenticator:
            h, p = sock.getpeername()
            try:
                sock, credentials = self.authenticator(sock)
            except AuthenticationError:
                self.logger.info("%s:%s failed to authenticate, rejecting connection", h, p)
                return None
        else:
            credentials = None
        # build a connection
        h, p = sock.getpeername()
        config = dict(self.protocol_config, credentials=credentials, connid="%s:%d"%(h, p))
        return Connection(self.service, Channel(SocketStream(sock)), config=config)
def _authenticate_and_build_connection ( self , sock ) : # authenticate if self . authenticator : h , p = sock . getpeername ( ) try : sock , credentials = self . authenticator ( sock ) except AuthenticationError : self . logger . info ( "%s:%s failed to authenticate, rejecting connection" , h , p ) return None else : credentials = None # build a connection h , p = sock . getpeername ( ) config = dict ( self . protocol_config , credentials = credentials , connid = "%s:%d" % ( h , p ) ) return Connection ( self . service , Channel ( SocketStream ( sock ) ) , config = config )