'This function sends an answer to the client. This has been
factorised because all answers follow the same format.'

def answer(self, code=REQUEST_GRANTED, ip_str='0.0.0.0', port_int=0):

    try:
        ip = socket.inet_aton(ip_str)
        port = port2string(port_int)
        packet = chr(0)
        packet += chr(code)
        packet += port
        packet += ip
        log.debug(thread.get_ident(), 'Sending    back:', code, string2port(port), socket.inet_ntoa(ip))
        self.client_socketet.send(packet)
    except:
        raise Client_Connection_Closed(sys.exc_info())
