diff options
author | Sam Truzjan <pxqr.sta@gmail.com> | 2014-01-08 20:48:31 +0400 |
---|---|---|
committer | Sam Truzjan <pxqr.sta@gmail.com> | 2014-01-08 20:48:31 +0400 |
commit | f1cea56f6077e563458c8075faf3ca592290b6d9 (patch) | |
tree | 773f1bad72b094e138606394eaec80cf8d81898b /src/Network/BitTorrent/DHT/Message.hs | |
parent | c252639b2b3b96fd021a76f57a1acbba11782eb9 (diff) |
Do not block on getNodeId
Diffstat (limited to 'src/Network/BitTorrent/DHT/Message.hs')
-rw-r--r-- | src/Network/BitTorrent/DHT/Message.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Network/BitTorrent/DHT/Message.hs b/src/Network/BitTorrent/DHT/Message.hs index ac4889fe..acecf8b1 100644 --- a/src/Network/BitTorrent/DHT/Message.hs +++ b/src/Network/BitTorrent/DHT/Message.hs | |||
@@ -106,13 +106,13 @@ node_id_key = "id" | |||
106 | -- | All queries have an \"id\" key and value containing the node ID | 106 | -- | All queries have an \"id\" key and value containing the node ID |
107 | -- of the querying node. | 107 | -- of the querying node. |
108 | data Query a = Query | 108 | data Query a = Query |
109 | { thisNodeId :: NodeId -- ^ node id of /quering/ node; | 109 | { queringNodeId :: NodeId -- ^ node id of /quering/ node; |
110 | , queryParams :: a -- ^ query parameters. | 110 | , queryParams :: a -- ^ query parameters. |
111 | } deriving (Show, Eq, Typeable) | 111 | } deriving (Show, Eq, Typeable) |
112 | 112 | ||
113 | instance BEncode a => BEncode (Query a) where | 113 | instance BEncode a => BEncode (Query a) where |
114 | toBEncode Query {..} = toDict $ | 114 | toBEncode Query {..} = toDict $ |
115 | node_id_key .=! thisNodeId .: endDict | 115 | node_id_key .=! queringNodeId .: endDict |
116 | <> | 116 | <> |
117 | dict (toBEncode queryParams) | 117 | dict (toBEncode queryParams) |
118 | where | 118 | where |
@@ -126,7 +126,7 @@ instance BEncode a => BEncode (Query a) where | |||
126 | -- | All responses have an \"id\" key and value containing the node ID | 126 | -- | All responses have an \"id\" key and value containing the node ID |
127 | -- of the responding node. | 127 | -- of the responding node. |
128 | data Response a = Response | 128 | data Response a = Response |
129 | { remoteNodeId :: NodeId -- ^ node id of /quered/ node; | 129 | { queredNodeId :: NodeId -- ^ node id of /quered/ node; |
130 | , responseVals :: a -- ^ query result. | 130 | , responseVals :: a -- ^ query result. |
131 | } deriving (Show, Eq, Typeable) | 131 | } deriving (Show, Eq, Typeable) |
132 | 132 | ||