class D4::HTTPSource

Overview

Seekable remote source backed by validated HTTP byte-range requests. A bounded LRU of blocks is cached; no full-file download is implicit.

Defined in:

d4/http.cr

Constructors

Instance Method Summary

Instance methods inherited from class D4::Source

close : Nil close, closed? : Bool closed?, read_at(offset : Int64, buffer : Bytes) : Int32 read_at, read_exact_at(offset : Int64, buffer : Bytes) : Nil read_exact_at, size : Int64 size

Constructor Detail

def self.new(url : String | URI, *, block_size : Int32 = 65536, cache_blocks : Int32 = 64, connect_timeout : Time::Span = 10.seconds, read_timeout : Time::Span = 30.seconds) #

[View source]

Instance Method Detail

def close : Nil #

[View source]
def closed? : Bool #

[View source]
def read_at(offset : Int64, buffer : Bytes) : Int32 #

[View source]
def size : Int64 #

[View source]