Closed slimshader closed 2 months ago
Update: I quickly coded custom Stream to serve as sending stream to debug the output and I noticed that Write() is never called on that stream so I guess the actual problem is not the fact that sendingStream is closed but that response is never actually written to it.
While the library doesn't directly support what you're doing, I think you can achieve what you're hoping for.
Check out our WebSocketMessageHandler
for an example of non-Stream based I/O.
If you write your own class derived from MessageHandlerBase
, you can create your own queues of incoming and outgoing messages.
Thanks! Looks like what I need indeed although still wandering why my code isn’t working even tho there are no errors.
Unfortunately, I just check out the example code for [WebSocketMessageHandler] and it does not look what I need. Will try figure out why stream-based code does not work as expected.
Hi,
I'd like to use StreamJsonRpc in less usual way: executing methods on the target but from JSON string as an inout, I managed this snipped to partially work:
In the debugger I see that Add() method is being called on RpcServer object, the problem I have is with the response. I am not able to read sendingStream as it is closed and ToArray() reuslts in empty array. How can I access the response?