test_server.py
def handle(self, host, port):
        """Handle completion notification requests on TCP port 8088.

        :return: True if the DPAE has complete training, False if an
        error occurred.
        """
        sckt = None
        try:
            sckt = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
            sckt.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
        except socket.error as err:
            self._logger.error("Unable to create socket: "
                               "{0}".format(err))
            return False
        try:
            sckt.bind((host, port))
            sckt.listen(1)
        except socket.error as err:
            self._logger.error("Unable to bind socket: {0}".format(err))
            sckt.close()
            return False
        while True:
            data = None
            try:
                conn, addr = sckt.accept()
                self._logger.info("Client connected: {0}".format(addr))
                data = conn.recv(self._RECV_BUF).strip()
                sckt.close()
            except socket.error as err:
                self._logger.error("Unable to accept connections on "
                                   "socket: {0}".format(err))
                sckt.close()
                return False
            self._logger.info("Received data: {0}".format(data))
            if data == self._DPAE_DONE:
                return True
        sckt.close()
        return False
Handle completion notification requests on TCP port 8088.

        :return: True if the DPAE has complete training, False if an
        error occurred.
        
Handle completion notification requests on TCP port 8088.
Handle completion notification requests on TCP port 8088 .
def handle(self, host, port):
        sckt = None
        try:
            sckt = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
            sckt.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
        except socket.error as err:
            self._logger.error("Unable to create socket: "
                               "{0}".format(err))
            return False
        try:
            sckt.bind((host, port))
            sckt.listen(1)
        except socket.error as err:
            self._logger.error("Unable to bind socket: {0}".format(err))
            sckt.close()
            return False
        while True:
            data = None
            try:
                conn, addr = sckt.accept()
                self._logger.info("Client connected: {0}".format(addr))
                data = conn.recv(self._RECV_BUF).strip()
                sckt.close()
            except socket.error as err:
                self._logger.error("Unable to accept connections on "
                                   "socket: {0}".format(err))
                sckt.close()
                return False
            self._logger.info("Received data: {0}".format(data))
            if data == self._DPAE_DONE:
                return True
        sckt.close()
        return False
def handle ( self , host , port ) : sckt = None try : sckt = socket . socket ( socket . AF_INET , socket . SOCK_STREAM ) sckt . setsockopt ( socket . SOL_SOCKET , socket . SO_REUSEADDR , 1 ) except socket . error as err : self . _logger . error ( "Unable to create socket: " "{0}" . format ( err ) ) return False try : sckt . bind ( ( host , port ) ) sckt . listen ( 1 ) except socket . error as err : self . _logger . error ( "Unable to bind socket: {0}" . format ( err ) ) sckt . close ( ) return False while True : data = None try : conn , addr = sckt . accept ( ) self . _logger . info ( "Client connected: {0}" . format ( addr ) ) data = conn . recv ( self . _RECV_BUF ) . strip ( ) sckt . close ( ) except socket . error as err : self . _logger . error ( "Unable to accept connections on " "socket: {0}" . format ( err ) ) sckt . close ( ) return False self . _logger . info ( "Received data: {0}" . format ( data ) ) if data == self . _DPAE_DONE : return True sckt . close ( ) return False
Handle completion notification requests on TCP port 8088.
Handle completion notification requests on TCP port 8088 .
"""Handle completion notification requests on TCP port 8088.

        :return: True if the DPAE has complete training, False if an
        error occurred.
        """
True if the DPAE has complete training, False if an
error occurred.
True if the DPAE has complete training False if an error occurred .
self
host
port