refactored library interface

This commit is contained in:
2024-11-10 18:54:39 +00:00
parent c89e73eb3b
commit 2e1ca51486
4 changed files with 36 additions and 22 deletions

View File

@@ -1,9 +1,14 @@
{-# LANGUAGE OverloadedStrings #-}
module P2Prc ( runP2Prc ) where
module Engine
( runP2PRC
)
where
import System.Process ( terminateProcess )
import Control.Concurrent ( threadDelay )
import API
@@ -34,8 +39,8 @@ import API
--
runP2Prc :: IO ()
runP2Prc = do
runP2PRC :: Int -> String -> IO ()
runP2PRC portNumber domainName = do
--
-- TODO: add quickcheck testing (quickchecking-dynamic)
@@ -98,7 +103,7 @@ runP2Prc = do
outputStr <- execListServers
print outputStr
mapPortOut <- execMapPort $ MkMapPortRequest 3333 "domain"
mapPortOut <- execMapPort $ MkMapPortRequest portNumber domainName
case mapPortOut of

9
haskell/lib/P2PRC.hs Normal file
View File

@@ -0,0 +1,9 @@
module P2PRC
( runP2PRC
)
where
import Engine
( runP2PRC
)