ContentsIndex
Barracuda.PendingAck
MaintainerHenning Guenther
Description
A datastructure storing messages for that we await an ACK.
Synopsis
data PendingAck sign
empty :: PendingAck sign
insert :: UTCTime -> Routed TargetContent sign -> SockAddr -> PendingAck sign -> PendingAck sign
reinsert :: UTCTime -> UTCTime -> Routed TargetContent sign -> SockAddr -> Set SockAddr -> PendingAck sign -> PendingAck sign
purgeNoAck :: UTCTime -> NominalDiffTime -> PendingAck sign -> (PendingAck sign, [(Routed TargetContent sign, UTCTime, Set SockAddr)])
ack :: UserID -> MessageID -> SockAddr -> PendingAck sign -> PendingAck sign
Documentation
data PendingAck sign
show/hide Instances
??? sign => Eq (PendingAck sign)
??? sign => Show (PendingAck sign)
empty :: PendingAck sign
Creates an empty PendingAck-structure
insert
:: UTCTimeThe time the message was sent
-> Routed TargetContent signThe message
-> SockAddrThe address the message was sent to
-> PendingAck signThe PendingAck-structure in which to insert
-> PendingAck sign
Insert a new message with the time it was received into the PendingAck data structure.
reinsert
:: UTCTimeThe time the message was sent for the first time
-> UTCTimeThe time when the message was sent last
-> Routed TargetContent signThe message
-> SockAddrThe address the message was sent to
-> Set SockAddrHosts that were unsuccessfully used in the routing process
-> PendingAck signThe PendingAck-structure in which to insert
-> PendingAck sign
Insert a message that already was unsuccessfully routed over a number of hosts.
purgeNoAck
:: UTCTimeNow
-> NominalDiffTimeHow long to wait for an ACK-message
-> PendingAck sign
-> (PendingAck sign, [(Routed TargetContent sign, UTCTime, Set SockAddr)])
Removes and returns all messages whose TTL has run out or received no ack
ack
:: UserIDUser of the received ACK
-> MessageIDMessage-id of the received ACK
-> SockAddrThe address that sent the ACK
-> PendingAck sign
-> PendingAck sign
To be called when an ACK-message was received
Produced by Haddock version 0.8