diff options
Diffstat (limited to 'src/Network')
-rw-r--r-- | src/Network/BitTorrent/Core/Node.hs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Network/BitTorrent/Core/Node.hs b/src/Network/BitTorrent/Core/Node.hs index 03f01ed0..da96ca43 100644 --- a/src/Network/BitTorrent/Core/Node.hs +++ b/src/Network/BitTorrent/Core/Node.hs | |||
@@ -122,6 +122,10 @@ data NodeAddr a = NodeAddr | |||
122 | 122 | ||
123 | $(deriveJSON omitRecordPrefix ''NodeAddr) | 123 | $(deriveJSON omitRecordPrefix ''NodeAddr) |
124 | 124 | ||
125 | -- | @127.0.0.1:6882@ | ||
126 | instance Default (NodeAddr IPv4) where | ||
127 | def = "127.0.0.1:6882" | ||
128 | |||
125 | -- | KRPC compatible encoding. | 129 | -- | KRPC compatible encoding. |
126 | instance Serialize a => Serialize (NodeAddr a) where | 130 | instance Serialize a => Serialize (NodeAddr a) where |
127 | get = NodeAddr <$> get <*> get | 131 | get = NodeAddr <$> get <*> get |