File: RemoteServer.hs

package info (click to toggle)
haskell-acid-state 0.16.1.4-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 932 kB
  • sloc: haskell: 3,692; makefile: 2
file content (13 lines) | stat: -rw-r--r-- 620 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
module RemoteServer where

import           Control.Exception (bracket)
import           Data.Acid         (closeAcidState, openLocalState)
import           Data.Acid.Remote  (acidServer, acidServerSockAddr, skipAuthenticationCheck)
import           RemoteCommon      (StressState (..))
import           Network.Socket    (SockAddr(..))

main :: IO ()
main = bracket (openLocalState $ StressState 0)
         closeAcidState $ acidServer skipAuthenticationCheck 8080
-- on Unixy systems we could use a Unix Domain Socket
--       closeAcidState $ acidServerSockAddr skipAuthenticationCheck (SockAddrUnix "remote.socket")