Safe Haskell | None |
---|---|
Language | Haskell2010 |
Defines the network API required for a Tor implementation to run.
- data TorNetworkStack lsock sock = TorNetworkStack {}
- data SomeNetworkStack = forall lsock sock . HasBackend sock => MkNS (TorNetworkStack lsock sock)
- toBackend :: TorNetworkStack ls s -> s -> Backend
- recvAll :: TorNetworkStack ls s -> s -> IO ByteString
- recvLine :: TorNetworkStack ls s -> s -> IO ByteString
Documentation
data TorNetworkStack lsock sock Source
The type of a Tor-compatible network stack. The first type variable is the type of a listener socket, the second the type of a standard connection socket.
TorNetworkStack | |
|
data SomeNetworkStack Source
A network stack, but with the type variables hidden.
forall lsock sock . HasBackend sock => MkNS (TorNetworkStack lsock sock) |
toBackend :: TorNetworkStack ls s -> s -> Backend Source
Convert a Tor-compatible network stack to a TLS-compatible Backend structure.
recvAll :: TorNetworkStack ls s -> s -> IO ByteString Source
Receive all the input from the socket as a lazy ByteString; this may cause the system to block upon some ByteString operations to fetch more data.
recvLine :: TorNetworkStack ls s -> s -> IO ByteString Source
Receive a line of ASCII text from a socket.