gameServer/OfficialServer/checker.hs
changeset 15721 27eb5abd5058
parent 13672 8bd973ab9c9c
child 15758 eee2b3eff91d
equal deleted inserted replaced
15720:f681c3f2eeba 15721:27eb5abd5058
    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