summaryrefslogtreecommitdiff
path: root/bench
diff options
context:
space:
mode:
authorSam Truzjan <pxqr.sta@gmail.com>2013-10-01 06:10:41 +0400
committerSam Truzjan <pxqr.sta@gmail.com>2013-10-01 06:10:41 +0400
commit258f21eb490ee3588dd3a1c7316ff41f7f355be7 (patch)
treec4eae6e12cfa8ebb7553a5b75654ae6371684d57 /bench
parent4a0653fc58869f4fc61230d3d11ef92626a8f52d (diff)
Allow passing ipv6 addresses
Diffstat (limited to 'bench')
-rw-r--r--bench/Main.hs3
-rw-r--r--bench/Server.hs3
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)
6import qualified Data.ByteString as B 6import qualified Data.ByteString as B
7import Criterion.Main 7import Criterion.Main
8import Network.KRPC 8import Network.KRPC
9import Network.Socket
9 10
10 11
11addr :: RemoteAddr 12addr :: RemoteAddr
12addr = (0, 6000) 13addr = SockAddrInet 6000 0
13 14
14echo :: Method ByteString ByteString 15echo :: Method ByteString ByteString
15echo = method "echo" ["x"] ["x"] 16echo = 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
4import Data.ByteString (ByteString) 4import Data.ByteString (ByteString)
5import Network.KRPC 5import Network.KRPC
6import Network.Socket
6 7
7 8
8echo :: Method ByteString ByteString 9echo :: Method ByteString ByteString
9echo = method "echo" ["x"] ["x"] 10echo = method "echo" ["x"] ["x"]
10 11
11main :: IO () 12main :: IO ()
12main = server 6000 [ echo ==> return ] 13main = server (SockAddrInet 6000 0) [ echo ==> return ]