Connection
is a union of plain TCP and TLS-encrypted streams, allowing the HTTP client to dispatch send/read over either transport.
delete
instantiate
(Fn [Connection] ())
deletes a Connection. This should usually not be called manually.
read
defn
(Fn [(Ref Connection a)] (Result String String))
(read conn)
reads from the connection. Returns (Result String String).
send
defn
(Fn [(Ref Connection a), (Ref String b)] (Result Int String))
(send conn msg)
sends a string over the connection.