diff options
author | Joe Crayne <joe@jerkface.net> | 2019-09-29 13:26:57 -0400 |
---|---|---|
committer | Joe Crayne <joe@jerkface.net> | 2020-01-01 19:35:18 -0500 |
commit | 0170ba6944ba4180c02a1f3d6b2482c036c7f040 (patch) | |
tree | 1ef2b69a179f4370535b4ba62ba3b0d7f6228db6 /dht | |
parent | 68d700fa49f3e4f63d69a85db01ba49f2fbc5aef (diff) |
TODO note about removing "weird-hack" in XMPPServer.
Diffstat (limited to 'dht')
-rw-r--r-- | dht/src/Network/StreamServer.hs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/dht/src/Network/StreamServer.hs b/dht/src/Network/StreamServer.hs index 80ed4ee2..79398e8e 100644 --- a/dht/src/Network/StreamServer.hs +++ b/dht/src/Network/StreamServer.hs | |||
@@ -130,7 +130,14 @@ streamServer cfg addrs = do | |||
130 | -- socket must be closed by 'quitListening'. | 130 | -- socket must be closed by 'quitListening'. |
131 | acceptLoop :: ServerConfig -> Socket -> Int -> IO () | 131 | acceptLoop :: ServerConfig -> Socket -> Int -> IO () |
132 | acceptLoop cfg sock n = handle (acceptException cfg n sock) $ do | 132 | acceptLoop cfg sock n = handle (acceptException cfg n sock) $ do |
133 | con <- accept sock | 133 | con <- accept sock -- TODO: We need to remember the (snd con) peer address here!!! |
134 | -- See also: "-- Weird hack: addr is would-be peer name" in XMPPServer.hs | ||
135 | -- If we remember the peer address here, we won't need that weird | ||
136 | -- hack or to call sIsConnected. | ||
137 | -- Probably we should move the | ||
138 | -- newtype Local a = Local a deriving (Eq,Ord,Show) | ||
139 | -- newtype Remote a = Remote a deriving (Eq,Ord,Show) | ||
140 | -- defines so that they are accessible to this module. | ||
134 | let conkey = n + 1 | 141 | let conkey = n + 1 |
135 | h <- socketToHandle (fst con) ReadWriteMode | 142 | h <- socketToHandle (fst con) ReadWriteMode |
136 | forkIO $ do | 143 | forkIO $ do |