-------------------------------------------------
-- Server
-------------------------------------------------


-- | Run a Nerf server on a given port.
runNerfServer :: Nerf -> N.PortID -> IO ()
runNerfServer nerf port = N.withSocketsDo $ do
    sock <- N.listenOn port
    forever $ sockHandler nerf sock
runNerfServer :: Nerf -> N.PortID -> IO ()
runNerfServer nerf port = N.withSocketsDo $ do
    sock <- N.listenOn port
    forever $ sockHandler nerf sock
runNerfServer nerf port = N.withSocketsDo $ do
    sock <- N.listenOn port
    forever $ sockHandler nerf sock