diff options
author | Sam T <pxqr.sta@gmail.com> | 2013-05-17 05:06:00 +0400 |
---|---|---|
committer | Sam T <pxqr.sta@gmail.com> | 2013-05-17 05:06:00 +0400 |
commit | 3d53b08b7fe4a7727418670e510d826eae576f14 (patch) | |
tree | e7d2cb26077b6ab4ab5e732034bc23d542419a85 /src/Data/Kademlia/RoutingTable.hs | |
parent | 448b86fca5cac5abfef66598391614a8a4f83a46 (diff) |
~ Reorganize modules.
Diffstat (limited to 'src/Data/Kademlia/RoutingTable.hs')
-rw-r--r-- | src/Data/Kademlia/RoutingTable.hs | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/src/Data/Kademlia/RoutingTable.hs b/src/Data/Kademlia/RoutingTable.hs deleted file mode 100644 index 98e15a0b..00000000 --- a/src/Data/Kademlia/RoutingTable.hs +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | module Data.Kademlia.RoutingTable | ||
2 | ( | ||
3 | ) where | ||
4 | |||
5 | import Data.ByteString | ||
6 | |||
7 | type NodeID = ByteString | ||
8 | type InfoHash = ByteString | ||
9 | |||
10 | type Bucket = [NodeID] | ||
11 | |||
12 | data Tree | ||
13 | = Tip Bucket | ||
14 | | Bin Table Table | ||
15 | |||
16 | data Table = Table { | ||
17 | tree :: Tree | ||
18 | , bucketSize :: Int | ||
19 | } | ||
20 | |||
21 | closest :: InfoHash -> Table -> [NodeID] | ||
22 | closest = undefined | ||
23 | |||
24 | insert :: NodeID -> Table -> Table | ||
25 | insert x t = undefined | ||
26 | |||
27 | -- TODO table serialization: usually we need to save table between | ||
28 | -- target program executions | ||