Project
Loading...
Searching...
No Matches
o2::aod::native::HttpByteSource Class Reference

#include <HttpByteSource.h>

Inherits o2::aod::native::ByteSource.

Classes

struct  Shared
 What all the requests on a source share: connections, TLS sessions and DNS. More...
 

Public Member Functions

 HttpByteSource (std::string url, Options const &options)
 
 ~HttpByteSource () override
 
uint64_t size () const override
 
void readInto (uint64_t off, size_t len, void *dst) override
 Throws IoError, or CorruptData when the range is past the end of the file.
 
void readvInto (std::span< ReadRequest > requests) override
 
uint64_t bytesRead () const override
 
uint64_t readCalls () const override
 HTTP requests sent.
 
std::string url () const override
 Without the query, which may hold a token.
 
bool isRemote () const override
 Whether each read is a network round trip, worth hiding behind decoding.
 
- Public Member Functions inherited from o2::aod::native::ByteSource
virtual ~ByteSource ()
 
virtual std::span< const uint8_t > tryMap (uint64_t off, size_t len)
 A view of the bytes without copying them, if the backend can provide it.
 
virtual bool canMap () const
 Whether tryMap() provides every range, so that nothing needs reading.
 
virtual void willNeed (uint64_t off, size_t len)
 Hints that a range will be needed soon, or is no longer needed.
 
virtual void dontNeed (uint64_t off, size_t len)
 

Additional Inherited Members

- Static Public Member Functions inherited from o2::aod::native::ByteSource
static std::unique_ptr< ByteSource > open (std::string url, const Options &)
 

Detailed Description

A file read over public HTTP(S) with ranged GETs (no authentication yet). readvInto() sends all its ranges at once as parallel requests, multiplexed on one connection with HTTP/2, or spread over Options::httpConnections connections with HTTP/1.1. Connections, TLS sessions and DNS are shared by all the calls on the source.

Definition at line 28 of file HttpByteSource.h.

Constructor & Destructor Documentation

◆ HttpByteSource()

o2::aod::native::HttpByteSource::HttpByteSource ( std::string  url,
Options const &  options 
)

Definition at line 106 of file HttpByteSource.cxx.

◆ ~HttpByteSource()

o2::aod::native::HttpByteSource::~HttpByteSource ( )
overridedefault

Member Function Documentation

◆ bytesRead()

uint64_t o2::aod::native::HttpByteSource::bytesRead ( ) const
inlineoverridevirtual

Implements o2::aod::native::ByteSource.

Definition at line 36 of file HttpByteSource.h.

◆ isRemote()

bool o2::aod::native::HttpByteSource::isRemote ( ) const
inlineoverridevirtual

Whether each read is a network round trip, worth hiding behind decoding.

Reimplemented from o2::aod::native::ByteSource.

Definition at line 41 of file HttpByteSource.h.

◆ readCalls()

uint64_t o2::aod::native::HttpByteSource::readCalls ( ) const
inlineoverridevirtual

HTTP requests sent.

Implements o2::aod::native::ByteSource.

Definition at line 38 of file HttpByteSource.h.

◆ readInto()

void o2::aod::native::HttpByteSource::readInto ( uint64_t  off,
size_t  len,
void *  dst 
)
overridevirtual

Throws IoError, or CorruptData when the range is past the end of the file.

Implements o2::aod::native::ByteSource.

Definition at line 143 of file HttpByteSource.cxx.

◆ readvInto()

void o2::aod::native::HttpByteSource::readvInto ( std::span< ReadRequest >  requests)
overridevirtual

Implements o2::aod::native::ByteSource.

Definition at line 149 of file HttpByteSource.cxx.

◆ size()

uint64_t o2::aod::native::HttpByteSource::size ( ) const
inlineoverridevirtual

Implements o2::aod::native::ByteSource.

Definition at line 33 of file HttpByteSource.h.

◆ url()

std::string o2::aod::native::HttpByteSource::url ( ) const
inlineoverridevirtual

Without the query, which may hold a token.

Implements o2::aod::native::ByteSource.

Definition at line 40 of file HttpByteSource.h.


The documentation for this class was generated from the following files: