/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
//! The plaintext TCP exchange shared by gopher, finger, and spartan: connect,
//! send one request, read the whole reply to EOF. (Gemini differs only in
//! wrapping the stream in TLS, so it has its own path.)
use ;
use TcpStream;
use crateError;
/// Open a plaintext TCP connection to `host:port`, send `request`, and read the
/// whole response to EOF (smolweb servers close the stream when done).
pub async