def setup_server_socket(self, interface='localhost', port=5050):
        """Sets up the socket listener.

        Args:
            interface: String name of which interface this socket will listen
                on.
            port: Integer TCP port number the socket will listen on.

        """
        self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)

        self.log.info('Starting up on %s port %s', interface, port)

        try:
            self.socket.bind((interface, port))
        except __HOLE__:
            self.log.critical('Socket bind IOError')
            raise

        self.socket.listen(1)
dataset/ETHPy150Open missionpinball/mpf/mpf/media_controller/core/bcp_server.py/BCPServer.setup_server_socket