diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2023-05-06 22:35:37 +0200 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2023-05-06 22:35:37 +0200 |
commit | ebe2292bc4bd19ec68935c2135160ca6aa0dbae3 (patch) | |
tree | d2899212d51923b14544dfb5b9e489ac5ee64514 /src/Test.hs | |
parent | f93392b5f716220e33c3e59a2d70206aee49d65e (diff) |
Initial IPv6 support
Diffstat (limited to 'src/Test.hs')
-rw-r--r-- | src/Test.hs | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/Test.hs b/src/Test.hs index f9f764b..a7dd730 100644 --- a/src/Test.hs +++ b/src/Test.hs @@ -14,7 +14,6 @@ import Data.ByteString qualified as B import Data.ByteString.Char8 qualified as BC import Data.ByteString.Lazy qualified as BL import Data.Foldable -import Data.IP (fromSockAddr) import Data.Ord import Data.Text (Text) import Data.Text qualified as T @@ -332,11 +331,7 @@ cmdStartServer = do let printPeer (idx, p) = do params <- peerIdentity p >>= return . \case PeerIdentityFull pid -> ("id":) $ map (maybe "<unnamed>" T.unpack . idName) (unfoldOwners pid) - _ -> ("addr":) $ case peerAddress p of - DatagramAddress _ saddr - | Just (addr, port) <- fromSockAddr saddr -> [show addr, show port] - | otherwise -> [] - PeerIceSession ice -> [show ice] + _ -> [ "addr", show (peerAddress p) ] outLine out $ unwords $ [ "peer", show idx ] ++ params update (nid, []) = printPeer (nid, peer) >> return (nid + 1, [(nid, peer)]) |