diff options
author | Sam Truzjan <pxqr.sta@gmail.com> | 2014-02-12 20:56:07 +0400 |
---|---|---|
committer | Sam Truzjan <pxqr.sta@gmail.com> | 2014-02-12 20:56:07 +0400 |
commit | cee8903392b263b938b7b4baaea6ef220ff03f21 (patch) | |
tree | b15724c90eed861a9c1bd276cc6a9d83008df0f7 /src/Network/BitTorrent/Exchange | |
parent | 538d67c8c29b5ba30a81ec4c516598d38352eaf0 (diff) |
Add getSession function
Diffstat (limited to 'src/Network/BitTorrent/Exchange')
-rw-r--r-- | src/Network/BitTorrent/Exchange/Wire.hs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Network/BitTorrent/Exchange/Wire.hs b/src/Network/BitTorrent/Exchange/Wire.hs index 4bd342ca..0414ebe7 100644 --- a/src/Network/BitTorrent/Exchange/Wire.hs +++ b/src/Network/BitTorrent/Exchange/Wire.hs | |||
@@ -56,6 +56,7 @@ module Network.BitTorrent.Exchange.Wire | |||
56 | 56 | ||
57 | -- ** Query | 57 | -- ** Query |
58 | , getConnection | 58 | , getConnection |
59 | , getSession | ||
59 | , getExtCaps | 60 | , getExtCaps |
60 | , getStats | 61 | , getStats |
61 | , getMetadata | 62 | , getMetadata |
@@ -571,6 +572,9 @@ getStats = lift $ use connStats | |||
571 | getConnection :: Wire s (Connection s) | 572 | getConnection :: Wire s (Connection s) |
572 | getConnection = lift ask | 573 | getConnection = lift ask |
573 | 574 | ||
575 | getSession :: Wire s s | ||
576 | getSession = lift (asks connSession) | ||
577 | |||
574 | {----------------------------------------------------------------------- | 578 | {----------------------------------------------------------------------- |
575 | -- Wrapper | 579 | -- Wrapper |
576 | -----------------------------------------------------------------------} | 580 | -----------------------------------------------------------------------} |