| empty :: r |
| Construct an empty routing table.
|
|
| hello :: UTCTime -> SockAddr -> [UserID] -> r -> r |
| Updates the routing table with information about which users
reside on a given host. Usually obtained through a HELLO protocol-message.
|
|
| routing :: UTCTime -> SockAddr -> [(UserID, Int)] -> r -> r |
| Given a timestamp, a SockAddr and the routing table of a host,
this function updates the available routing information. This
information is usually provided by a ROUTING protocol-message,
therefore each hop count is increased by 1.
|
|
| delete :: SockAddr -> r -> r |
| Deletes a given host and all related routing information from the
routing table. Usually this is triggered by that host leaving the
transmission range.
|
|
| userList :: r -> Set UserID |
| Gives a set of all users that are known through the information
in the routing table.
|
|
| mergeRoutes :: Set UserID -> r -> Map UserID Int |
| Merges all known routes to one map. The Set of UserID are the local
users that are deleted from the data.
|
|
| mergeRoutesFor :: SockAddr -> Set UserID -> r -> Map UserID Int |
| Put together routing informations that have to be send to a given
host, wich includes deleting the routing information from that host.
The Set of UserID are the local users that are removed from the
returned Map.
This function does not have to be implemented, there is a default implementation.
|
|
| neighbors :: r -> Set SockAddr |
| Get a set of direct neighbors (nodes that are reachable without routing).
|