mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-11-29 00:01:06 -05:00
yet another compliance fix for the DNS protocol; while udp is the preferred transport, in case a truncated response is received, the resolver will switch to tcp, and performm the DNS query again. This introduces a new resolver option, `:socket_type`, which is `:udp` by default.
27 lines
486 B
Plaintext
27 lines
486 B
Plaintext
module HTTPX
|
|
class Buffer
|
|
extend Forwardable
|
|
|
|
include _ToS
|
|
include _ToStr
|
|
|
|
@buffer: String
|
|
|
|
attr_reader limit: Integer
|
|
|
|
def full?: () -> bool
|
|
def shift!: (Integer) -> void
|
|
def capacity: () -> Integer
|
|
|
|
# delegated
|
|
def <<: (string data) -> String
|
|
def empty?: () -> bool
|
|
def bytesize: () -> (Integer | Float)
|
|
def clear: () -> void
|
|
def replace: (string) -> void
|
|
|
|
private
|
|
|
|
def initialize: (Integer limit) -> untyped
|
|
end
|
|
end |