'Constructor of the server.'

def __init__(self, w3afAgentServer_address='127.0.0.1', w3afAgentServer_port=9092):

    threading.Thread.__init__(self)
    self._w3afAgentServer_address = w3afAgentServer_address
    self._w3afAgentServer_port = w3afAgentServer_port
    global log
    log = logger(printDebug=True)
    (hostname, aliaslist, ipaddrlist) = socket.gethostbyname_ex(socket.gethostname())
    self.socks_bind_address = None
    for ip in ipaddrlist:
        if is_routable(ip):
            self.socks_bind_address = ip
            break
    if (self.socks_bind_address is None):
        self.socks_bind_address = ipaddrlist[0]
    log.info('The    chosen    bind    adress    is', self.socks_bind_address)
