def token_generator():
    """
    Generate Token number up to 2**8.
    This token is used for client server communication.
    :return: int
    """
    token, max_token = 1, pow(2, 8)
    while True:
        yield token
        token += 1
        if token >= max_token:
            token = 1
