def head.read
import bend-kit-websocket@0.4.0.0/websocket.bend as Websocketimport Base
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes
839# Reads an HTTP head: the text before its blank line, and the bytes after it.
840def head.read(sock: Socket, +tls: Bool, +ms: U32) -> IO(Socket & Result<&1, &1, U32 & String, String & Bytes.Bytes>):
841 head.loop(256n, HSplit{sock, Short{Bytes.new(0)}}, tls, ms)