summaryrefslogtreecommitdiff
path: root/Presence/main.hs
diff options
context:
space:
mode:
authorjoe <joe@jerkface.net>2013-06-27 22:06:31 -0400
committerjoe <joe@jerkface.net>2013-06-27 22:06:31 -0400
commit61e76eb99c74aa4c0769e2fe7f280b9a4530171d (patch)
tree3c0666fa38d1d68180add0b2ce7a8bf4593f69df /Presence/main.hs
parent79887be9ef0d95a44e7fdad1a143aaca28947eb8 (diff)
Converted to SocketLike and quitListening interfaces.
Paving the way for conversion to conduits-based server over HaXml.
Diffstat (limited to 'Presence/main.hs')
-rw-r--r--Presence/main.hs9
1 files changed, 4 insertions, 5 deletions
diff --git a/Presence/main.hs b/Presence/main.hs
index 74589a41..a0a80569 100644
--- a/Presence/main.hs
+++ b/Presence/main.hs
@@ -27,7 +27,6 @@ import UTmp
27import FGConsole 27import FGConsole
28import XMPPServer 28import XMPPServer
29import Data.HList 29import Data.HList
30import Network.Socket (sClose)
31import Control.Exception 30import Control.Exception
32import LocalPeerCred 31import LocalPeerCred
33import System.Posix.User 32import System.Posix.User
@@ -223,16 +222,16 @@ start ip4or6 = do
223 utmp_file 222 utmp_file
224 dologin 223 dologin
225#endif 224#endif
226 sockLocals <- listenForXmppClients ip4or6 (UnixSessions tracked) 5222 HNil 225 clients <- listenForXmppClients ip4or6 (UnixSessions tracked) 5222 HNil
227 sockRemotes <- listenForRemotePeers ip4or6 (UnixSessions tracked) 5269 HNil 226 peers <- listenForRemotePeers ip4or6 (UnixSessions tracked) 5269 HNil
228 227
229 threadDelay 1000 -- wait a moment to obtain current tty 228 threadDelay 1000 -- wait a moment to obtain current tty
230 dologin () 229 dologin ()
231 putStrLn "\nHit enter to terminate...\n" 230 putStrLn "\nHit enter to terminate...\n"
232 getLine 231 getLine
233 killThread remotes 232 killThread remotes
234 sClose sockLocals 233 quitListening clients
235 sClose sockRemotes 234 quitListening peers
236 -- threadDelay 1000 235 -- threadDelay 1000
237 putStrLn "closed listener." 236 putStrLn "closed listener."
238 unmonitorTTY mtty 237 unmonitorTTY mtty