equal
deleted
inserted
replaced
26 import Control.Monad.Error |
26 import Control.Monad.Error |
27 import System.Directory |
27 import System.Directory |
28 import Control.Monad.State |
28 import Control.Monad.State |
29 import Control.Concurrent.Chan |
29 import Control.Concurrent.Chan |
30 import Control.Concurrent |
30 import Control.Concurrent |
31 import Network |
31 import Network.BSD hiding (recv) |
32 import Network.BSD |
|
33 import Network.Socket hiding (recv, sClose) |
32 import Network.Socket hiding (recv, sClose) |
34 import Network.Socket.ByteString |
33 import Network.Socket.ByteString |
35 import qualified Data.ByteString.Char8 as B |
34 import qualified Data.ByteString.Char8 as B |
36 import qualified Data.ByteString as BW |
35 import qualified Data.ByteString as BW |
37 import qualified Codec.Binary.Base64 as Base64 |
36 import qualified Codec.Binary.Base64 as Base64 |
205 return (l, p) |
204 return (l, p) |
206 |
205 |
207 |
206 |
208 Exception.bracket |
207 Exception.bracket |
209 setupConnection |
208 setupConnection |
210 (\s -> noticeM "Core" "Shutting down" >> sClose s) |
209 (\s -> noticeM "Core" "Shutting down" >> close s) |
211 (session login password (d ++ "/.hedgewars") exeFullname dataPrefix) |
210 (session login password (d ++ "/.hedgewars") exeFullname dataPrefix) |
212 where |
211 where |
213 setupConnection = do |
212 setupConnection = do |
214 noticeM "Core" "Connecting to the server..." |
213 noticeM "Core" "Connecting to the server..." |
215 |
214 |