Skip to main content

https_get_binary_attempt

Function https_get_binary_attempt 

Source
fn https_get_binary_attempt(
    remote_ip: [u8; 4],
    host: &str,
    path: &str,
) -> Result<(Vec<u8>, bool), &'static str>
Expand description

1回分のHTTPS GET試行。戻り値は(生レスポンス, Content-Lengthと矛盾なく 完全に受信できたか)。呼び出し元https_get_binaryがこれを複数回試行し、 打ち切り(TLSタイムアウト等による部分受信)を検出したら再試行する。 remote_ipは呼び出し元で1回だけ解決済みのものを使い回す (DNS解決自体を毎試行で繰り返さないため)。