toxcore-0.2.11: A Tox protocol implementation in Haskell
Safe HaskellSafe
LanguageHaskell2010

Network.Tox.DHT.Operation

Synopsis

Documentation

class (Networked m, Timed m, MonadRandomBytes m, MonadState DhtState m, Keyed m) => DhtNodeMonad m Source #

Instances

Instances details
DhtNodeMonad TestDhtNodeMonad Source # 
Instance details

Defined in Network.Tox.DHT.Operation

sendDhtPacket :: (DhtNodeMonad m, Binary payload) => NodeInfo -> PacketKind -> payload -> m () Source #

sendRpcRequest :: (DhtNodeMonad m, Binary payload) => NodeInfo -> PacketKind -> payload -> m () Source #

modifyM :: MonadState s m => (s -> m s) -> m () Source #

zoom_ :: MonadState s' m => Lens' s' s -> StateT s m a -> m a Source #

adapted from michaelt's lens-simple: zoom_ is like zoom but for convenience returns an mtl style abstracted MonadState state, rather than a concrete StateT, recapturing a bit more of the abstractness of Control.Lens.zoom

doDHT :: DhtNodeMonad m => m () Source #

type NatPingPacket = () Source #

TODO

type DhtPKPacket = () Source #

TODO

newtype ArbStdGen Source #

wrap StdGen so the Arbitrary instance isn't an orphan

Constructors

ArbStdGen 

Instances

Instances details
Show ArbStdGen Source # 
Instance details

Defined in Network.Tox.DHT.Operation

Arbitrary ArbStdGen Source # 
Instance details

Defined in Network.Tox.DHT.Operation