Display custom node in ConstModule
Also wrote a short introductory node explaining node permissions.
This commit is contained in:
parent
29e19ec1b2
commit
4c24430c07
5 changed files with 66 additions and 66 deletions
|
|
@ -18,11 +18,11 @@ import Forest.Util
|
|||
|
||||
sendUpdatesThread :: WS.Connection -> Chan Node -> Node -> IO ()
|
||||
sendUpdatesThread conn nodeChan _ = do
|
||||
newNode <- readChan nodeChan
|
||||
node' <- readChan nodeChan
|
||||
-- TODO Don't send the whole node every time
|
||||
putStrLn $ "Sending full node update with " ++ show newNode
|
||||
sendPacket conn $ ServerUpdate (Path []) newNode
|
||||
sendUpdatesThread conn nodeChan newNode
|
||||
putStrLn $ "Sending full node update with " ++ show node'
|
||||
sendPacket conn $ ServerUpdate (Path []) node'
|
||||
sendUpdatesThread conn nodeChan node'
|
||||
|
||||
{- Main server application that receives and processes client packets -}
|
||||
|
||||
|
|
@ -58,4 +58,4 @@ serverApp pingDelay constructor pendingConnection = do
|
|||
constructor (writeChan chan) $ receivePackets conn
|
||||
_ -> closeWithErrorMessage conn "Invalid packet: Expected a hello packet"
|
||||
where
|
||||
initialNode = emptyNode "Loading ..." False False False False
|
||||
initialNode = emptyNode "" "Loading ..."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue