| Safe Haskell | None |
|---|
Network.BERT.Server
Contents
Description
BERT-RPC server (http://bert-rpc.org/). This implements the client RPC call/reply logic. Only synchronous requests are supported at this time.
Documentation
data DispatchResult Source
Constructors
| Success Term | |
| NoSuchModule | |
| NoSuchFunction | |
| Undesignated String |
Instances
Serve
To serve requests, create a server and call serve with a
dispatch function.
main = do s <- tcpServer 8080 serve s dispatch dispatch "calc" "add" [IntTerm a, IntTerm b] = return $ Success $ IntTerm (a + b) dispatch "calc" _ _ = return NoSuchFunction dispatch _ _ _ = return NoSuchModule