(self, server)
do the work of sending a TCP request
do the work of sending a TCP request
do the work of sending a TCP request
def sendTCPRequest(self, server):
        " do the work of sending a TCP request "
        import time
        import Lib
        self.response = None
        for self.ns in server:
            try:
                self.socketInit(socket.AF_INET, socket.SOCK_STREAM)
                self.time_start = time.time()
                self.conn()
                self.s.send(Lib.pack16bit(len(self.request)) + self.request)
                self.s.shutdown(1)
                self.response = self.processTCPReply()
            except socket.error:
                continue
            break
        if not self.response:
            raise DNSError('no working nameservers found')
def sendTCPRequest ( self , server ) : import time import Lib self . response = None for self . ns in server : try : self . socketInit ( socket . AF_INET , socket . SOCK_STREAM ) self . time_start = time . time ( ) self . conn ( ) self . s . send ( Lib . pack16bit ( len ( self . request ) ) + self . request ) self . s . shutdown ( 1 ) self . response = self . processTCPReply ( ) except socket . error : continue break if not self . response : raise DNSError ( 'no working nameservers found' )