def setsockopt(self, socket, option, value):
    if (not isinstance(socket, TransmissionControlObject)):
        raise Error(errno.ENOTSOCK)
    if (option == SO_RCVMIU):
        value = min(value, self.cfg['recv-miu'])
    socket.setsockopt(option, value)
    return socket.getsockopt(option)
def setsockopt(self, socket, option, value):
    if (not isinstance(socket, TransmissionControlObject)):
        raise Error(errno.ENOTSOCK)
    if (option == SO_RCVMIU):
        value = min(value, self.cfg['recv-miu'])
    socket.setsockopt(option, value)
    return socket.getsockopt(option)