Example #1
0
    def settimeout(self, timeout):
        if timeout < 0: raise ValueError("invalid timeout")

        if timeout == 0:
            self.setblocking(False)
        else:
            self.setblocking(True)

        bt.settimeout(self._sockfd, timeout)
        self._timeout = timeout
Example #2
0
    def settimeout (self, timeout):
        if timeout < 0: raise ValueError ("invalid timeout")

        if timeout == 0:
            self.setblocking (False)
        else:
            self.setblocking (True)

        bt.settimeout (self._sockfd, timeout)
        self._timeout = timeout
Example #3
0
    def settimeout(self, timeout):
        if timeout < 0: raise ValueError("invalid timeout")

        if timeout == 0:
            self.setblocking(False)
        else:
            self.setblocking(True)
            # XXX this doesn't look correct
            timeout = 0  # winsock timeout still needs to be set 0

        s = bt.settimeout(self._sockfd, timeout)
        self._timeout = timeout
Example #4
0
    def settimeout (self, timeout):
        if timeout < 0: raise ValueError ("invalid timeout")

        if timeout == 0:
            self.setblocking (False)
        else:
            self.setblocking (True)
            # XXX this doesn't look correct
            timeout = 0 # winsock timeout still needs to be set 0

        s = bt.settimeout (self._sockfd, timeout)
        self._timeout = timeout