summaryrefslogtreecommitdiff
path: root/tests/Server.hs
blob: b4b34891acd9194b2b1172dd3ce6aee8e2301277 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{-# LANGUAGE IncoherentInstances #-}
module Main (main) where

import Data.BEncode
import Network.KRPC
import Network.Socket
import Shared


main :: IO ()
main = server (SockAddrInet 6000 0)
  [ unitM ==> return
  , echoM ==> return
  , echoBytes ==> return
  , swapM ==> \(a, b) -> return (b, a)
  , reverseM ==> return . reverse
  , shiftR ==> \(a, b, c) -> return (c, a, b)
  , rawM      ==> return
  , rawDictM  ==> return
  ]