WebSockets support?

Oct 26, 2013 at 1:42 AM

I just stumbled upon this project while searching for a .NET json-rpc Client Implementation for .NET.

Is the WebSockets protocol supported or is it HTTP only? After a quick look at the source code I am worried it does not support WebSockets and therefore can not handle server callbacks.

If its not possible with json-rpc.net, is this a planned feature?
Oct 26, 2013 at 10:55 PM
It is possible, however there is no built-in websocket adapter.

If you follow the documentation to get a console server running, then you should have a good idea of how to integrate it with web sockets.

I currently use this server over a raw socket connection.
Dec 6, 2013 at 8:54 PM
Can you provide us a simple starting example to use it over raw sockets?
Dec 6, 2013 at 10:35 PM
Well if you were using a socket client like:
and a server like:

Then whenever you receive a string on the server you could pass it to the jsonRpc engine.

and then when the engine has its response ready, you can just send that string back to the client.

You can use the JsonRpcStateAsync to store the socket you want to send the data back on, and then that will make managing which connection receive which response much easier.

I'll see if I can put all that down as a built example later, but you should be able to get it working using those links.