diff options
author | Sam T <pxqr.sta@gmail.com> | 2013-07-08 04:25:15 +0400 |
---|---|---|
committer | Sam T <pxqr.sta@gmail.com> | 2013-07-08 04:25:15 +0400 |
commit | 83098eaf867b286048a41a16da47e5a1fd04d68d (patch) | |
tree | 7d4bef5efe4b26ad924e838f8975cb7ca22a4617 /src | |
parent | cef3eccbe44e4b4d125f94ef87444b5291077288 (diff) |
~ Change newPeerId to genPeerId.
To follow DHT genNodeId.
Diffstat (limited to 'src')
-rw-r--r-- | src/Network/BitTorrent/Internal.lhs | 2 | ||||
-rw-r--r-- | src/Network/BitTorrent/Peer.hs | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/Network/BitTorrent/Internal.lhs b/src/Network/BitTorrent/Internal.lhs index 475c5e32..a69016ff 100644 --- a/src/Network/BitTorrent/Internal.lhs +++ b/src/Network/BitTorrent/Internal.lhs | |||
@@ -364,7 +364,7 @@ and different enabled extensions at the same time. | |||
364 | > _ <- forkIO $ loop mgr | 364 | > _ <- forkIO $ loop mgr |
365 | 365 | ||
366 | > ClientSession | 366 | > ClientSession |
367 | > <$> newPeerId | 367 | > <$> genPeerId |
368 | > <*> pure exts | 368 | > <*> pure exts |
369 | > <*> pure 10 -- forkListener (error "listener") | 369 | > <*> pure 10 -- forkListener (error "listener") |
370 | > <*> MSem.new n | 370 | > <*> MSem.new n |
diff --git a/src/Network/BitTorrent/Peer.hs b/src/Network/BitTorrent/Peer.hs index 4615ad3a..97c9f57f 100644 --- a/src/Network/BitTorrent/Peer.hs +++ b/src/Network/BitTorrent/Peer.hs | |||
@@ -43,7 +43,7 @@ module Network.BitTorrent.Peer | |||
43 | , defaultClientId, defaultVersionNumber | 43 | , defaultClientId, defaultVersionNumber |
44 | 44 | ||
45 | -- ** Generation | 45 | -- ** Generation |
46 | , newPeerId, timestampByteString | 46 | , genPeerId, timestampByteString |
47 | 47 | ||
48 | -- ** Extra | 48 | -- ** Extra |
49 | , byteStringPadded | 49 | , byteStringPadded |
@@ -199,8 +199,8 @@ timestampByteString = (BC.pack . format) <$> getCurrentTime | |||
199 | -- | 199 | -- |
200 | -- * UTC time day ++ day time for the random number. | 200 | -- * UTC time day ++ day time for the random number. |
201 | -- | 201 | -- |
202 | newPeerId :: IO PeerId | 202 | genPeerId :: IO PeerId |
203 | newPeerId = azureusStyle defaultClientId defaultVersionNumber | 203 | genPeerId = azureusStyle defaultClientId defaultVersionNumber |
204 | <$> timestampByteString | 204 | <$> timestampByteString |
205 | 205 | ||
206 | -- | Pad bytestring so it's becomes exactly request length. Conversion | 206 | -- | Pad bytestring so it's becomes exactly request length. Conversion |