Created
March 23, 2015 21:10
-
-
Save kolmodin/8d1de957ccf574f4c5c3 to your computer and use it in GitHub Desktop.
gRPC in Haskell
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hello = SayHello "/helloworld.Greeter/SayHello" . HelloRequest | |
main :: IO () | |
main = do | |
c_grpc_init | |
channel <- channelCreate "localhost:50051" (ChannelArgs nullPtr) | |
context <- newClientContext channel | |
invokeCall context (hello "Haskell") >>= print | |
channelDestroy channel | |
c_grpc_shutdown | |
$ dist/build/helloworldclient/helloworldclient | |
RpcOk (HelloReply "\n\rHello Haskell") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment