diff options
author | Sam Truzjan <pxqr.sta@gmail.com> | 2013-10-14 05:11:46 +0400 |
---|---|---|
committer | Sam Truzjan <pxqr.sta@gmail.com> | 2013-10-14 05:11:46 +0400 |
commit | b5f222ba7dfa1fa53b8b53f4e1b770193bb55fe4 (patch) | |
tree | f24b2f677d78a05139b9e190a60ea75bc64f49b4 /src/Network/BitTorrent/DHT | |
parent | 9737a06bff6c6539a6afd67f7970a6923b401d86 (diff) |
Move some modules from torrent-content
Diffstat (limited to 'src/Network/BitTorrent/DHT')
-rw-r--r-- | src/Network/BitTorrent/DHT/Protocol.hs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/Network/BitTorrent/DHT/Protocol.hs b/src/Network/BitTorrent/DHT/Protocol.hs index 73e5fa68..0ac814b7 100644 --- a/src/Network/BitTorrent/DHT/Protocol.hs +++ b/src/Network/BitTorrent/DHT/Protocol.hs | |||
@@ -42,7 +42,7 @@ import Network.BitTorrent.Exchange.Protocol () | |||
42 | 42 | ||
43 | type NodeId = ByteString | 43 | type NodeId = ByteString |
44 | 44 | ||
45 | -- WARN is the 'system' random suitable for this? | 45 | -- TODO WARN is the 'system' random suitable for this? |
46 | -- | Generate random NodeID used for the entire session. | 46 | -- | Generate random NodeID used for the entire session. |
47 | -- Distribution of ID's should be as uniform as possible. | 47 | -- Distribution of ID's should be as uniform as possible. |
48 | -- | 48 | -- |
@@ -56,9 +56,7 @@ data NodeAddr = NodeAddr { | |||
56 | 56 | ||
57 | instance Serialize NodeAddr where | 57 | instance Serialize NodeAddr where |
58 | get = NodeAddr <$> getWord32be <*> get | 58 | get = NodeAddr <$> getWord32be <*> get |
59 | put NodeAddr {..} = do | 59 | put NodeAddr {..} = putWord32be nodeIP >> put nodePort |
60 | putWord32be nodeIP | ||
61 | put nodePort | ||
62 | 60 | ||
63 | data NodeInfo = NodeInfo { | 61 | data NodeInfo = NodeInfo { |
64 | nodeID :: !NodeId | 62 | nodeID :: !NodeId |