| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Tox.Conduit.DHT
Synopsis
- newtype DhtConduit i o m a = DhtConduit {
- unDhtConduit :: ConduitT i o m a
- dhtPacketHandler :: forall m. (Timed m, MonadRandomBytes m, MonadState DhtState m, Keyed m) => ConduitT (NodeInfo, Packet ByteString) (NodeInfo, Packet ByteString) m ()
- dhtMaintenanceLoop :: forall i m. (Timed m, MonadRandomBytes m, MonadState DhtState m, Keyed m) => ConduitT i (NodeInfo, Packet ByteString) m ()
- dhtBootstrapFrom :: forall i m. (Timed m, MonadRandomBytes m, MonadState DhtState m, Keyed m) => NodeInfo -> ConduitT i (NodeInfo, Packet ByteString) m ()
Documentation
newtype DhtConduit i o m a Source #
A wrapper around ConduitT to provide the necessary instances for DHT logic
without requiring orphan instances.
Constructors
| DhtConduit | |
Fields
| |
Instances
dhtPacketHandler :: forall m. (Timed m, MonadRandomBytes m, MonadState DhtState m, Keyed m) => ConduitT (NodeInfo, Packet ByteString) (NodeInfo, Packet ByteString) m () Source #
Conduit that handles incoming DHT packets.
dhtMaintenanceLoop :: forall i m. (Timed m, MonadRandomBytes m, MonadState DhtState m, Keyed m) => ConduitT i (NodeInfo, Packet ByteString) m () Source #
Run maintenance operations within a conduit.
dhtBootstrapFrom :: forall i m. (Timed m, MonadRandomBytes m, MonadState DhtState m, Keyed m) => NodeInfo -> ConduitT i (NodeInfo, Packet ByteString) m () Source #
Bootstrap from a node within a conduit.