Closed Sabbirshubho closed 5 months ago
Try this:
eval_promise = my_service.sendMessage(data_request)
response = (await eval_promise).response
If I understand correctly, _Response
inherits from _DynamicStructReader
which can access your data.
Yes you are right. I missed that part.
I want to make a client-server application. where upon a request server will build the message then serialize the message and send it to client. Client will deserialize the received message. This is my capnp file.
My server side implementation looks like this:
In my client side implementation look like this:
As I am serializing the data before sending thats why I kept the response from sendMessage() as Data in .capnp file. The problem is I receive the response in client as capnp.lib.capnp._Response object which doesn't contain the data. how to extract the data in that case? My goal is send serialize data over rpc and deserialize it afterwards. I am using v2.0 beta version. Thanks in advance.