diff options
Diffstat (limited to 'bench')
-rw-r--r-- | bench/Main.hs | 3 | ||||
-rw-r--r-- | bench/Server.hs | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/bench/Main.hs b/bench/Main.hs index fdf76cc2..024d4d93 100644 --- a/bench/Main.hs +++ b/bench/Main.hs | |||
@@ -6,10 +6,11 @@ import Data.ByteString (ByteString) | |||
6 | import qualified Data.ByteString as B | 6 | import qualified Data.ByteString as B |
7 | import Criterion.Main | 7 | import Criterion.Main |
8 | import Network.KRPC | 8 | import Network.KRPC |
9 | import Network.Socket | ||
9 | 10 | ||
10 | 11 | ||
11 | addr :: RemoteAddr | 12 | addr :: RemoteAddr |
12 | addr = (0, 6000) | 13 | addr = SockAddrInet 6000 0 |
13 | 14 | ||
14 | echo :: Method ByteString ByteString | 15 | echo :: Method ByteString ByteString |
15 | echo = method "echo" ["x"] ["x"] | 16 | echo = method "echo" ["x"] ["x"] |
diff --git a/bench/Server.hs b/bench/Server.hs index 444362c1..ef20c08a 100644 --- a/bench/Server.hs +++ b/bench/Server.hs | |||
@@ -3,10 +3,11 @@ module Main (main) where | |||
3 | 3 | ||
4 | import Data.ByteString (ByteString) | 4 | import Data.ByteString (ByteString) |
5 | import Network.KRPC | 5 | import Network.KRPC |
6 | import Network.Socket | ||
6 | 7 | ||
7 | 8 | ||
8 | echo :: Method ByteString ByteString | 9 | echo :: Method ByteString ByteString |
9 | echo = method "echo" ["x"] ["x"] | 10 | echo = method "echo" ["x"] ["x"] |
10 | 11 | ||
11 | main :: IO () | 12 | main :: IO () |
12 | main = server 6000 [ echo ==> return ] | 13 | main = server (SockAddrInet 6000 0) [ echo ==> return ] |