Implement basic server executable
This commit is contained in:
parent
33f1076b52
commit
42e9f6d462
3 changed files with 55 additions and 12 deletions
|
|
@ -1,2 +1,22 @@
|
|||
module Main where
|
||||
|
||||
import qualified Network.WebSockets as WS
|
||||
|
||||
import Forest.Server
|
||||
import Forest.TreeModule.ConstModule
|
||||
|
||||
pingDelay :: Int
|
||||
pingDelay = 10
|
||||
|
||||
pongDelay :: Int
|
||||
pongDelay = 3 * pingDelay
|
||||
|
||||
options :: WS.ServerOptions
|
||||
options = WS.defaultServerOptions
|
||||
{ WS.serverRequirePong = Just pongDelay
|
||||
}
|
||||
|
||||
main :: IO ()
|
||||
main = putStrLn "There is only night."
|
||||
main = do
|
||||
putStrLn "Starting server"
|
||||
WS.runServerWithOptions options $ serverApp pingDelay constModule
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue