def check_sended(socket, data_bytes):
    """
    Make sure all bytes are sent through the socket
    Parameters
    ----------
    socket
    data_bytes

    Returns
    -------

    """
    sended = 0
    while sended < len(data_bytes):
        sended += socket.send(data_bytes[sended:])
