def METHOD_NAME(self, client, delimiter) -> bytes:
    """receive data until a delimiter has been reached
    Args:
        client (socket.socket): client socket
        delimiter (bytes): bytestring representing the delimiter
    Returns:
        Union[None, bytes]: None if no data was received otherwise send received data
    """        
    message = b""
    start_receive_time = time.time()
    client.settimeout(4)
    while delimiter not in message and time.time() - start_receive_time <= ReceiveConnectionsConstants().RECEIVECONNECTIONDATATIMEOUT:
        try:
            message = message + client.recv(ReceiveConnectionsConstants().CONNECTION_DATA_BUFFER)
        except:
            return message
    return message