Set the timeout value for this socket.

def settimeout(self, timeout):
        '''
        Set the timeout value for this socket.
        '''
        if timeout is None:
            self._block = True
        elif float(timeout) == 0.0:
            self._block = False
        else:
            self._timeout = float(timeout)
            self._block = True