Compare commits
1 commit
main
...
tls-suppor
Author | SHA1 | Date | |
---|---|---|---|
00f85651ca |
3 changed files with 10 additions and 5 deletions
|
@ -29,7 +29,9 @@ executable hannah
|
|||
, hanafuda
|
||||
, hanafuda-APILanguage
|
||||
, mtl
|
||||
, network
|
||||
, text
|
||||
, websockets
|
||||
, wuss
|
||||
hs-source-dirs: src
|
||||
default-language: Haskell2010
|
||||
|
|
|
@ -4,11 +4,13 @@ module Config (
|
|||
, port
|
||||
) where
|
||||
|
||||
import Network.Socket (PortNumber)
|
||||
|
||||
host :: String
|
||||
host = "koikoi.menf.in"
|
||||
|
||||
path :: String
|
||||
path = "/play/"
|
||||
|
||||
port :: Int
|
||||
port = 80
|
||||
port :: PortNumber
|
||||
port = 443
|
||||
|
|
|
@ -1,14 +1,15 @@
|
|||
module Main where
|
||||
|
||||
import Network.WebSockets (ClientApp, runClient)
|
||||
import Automaton (start)
|
||||
import Control.Monad.Reader (runReaderT)
|
||||
import Control.Monad.State (runStateT)
|
||||
import Config (host, port, path)
|
||||
import Automaton (start)
|
||||
import Network.WebSockets (ClientApp)
|
||||
import Wuss (runSecureClient)
|
||||
|
||||
bot :: ClientApp ()
|
||||
bot connection = runReaderT Automaton.start connection
|
||||
|
||||
main :: IO ()
|
||||
main =
|
||||
runClient host port path bot
|
||||
runSecureClient host port path bot
|
||||
|
|
Loading…
Reference in a new issue