-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create a header-less StreamHandler #263
Comments
So does OVSDB literally put one JSON-RPC message directly after another? Like this: { "id": 1, ... }{ "id": 2 ...} Doing such a thing isn't well supported by newtonsoft.json last I checked. It doesn't like being given partial JSON fragments to try to deserialize, so we'd end up deserializing many times as fragments get read in until we hit on what happens to be a message boundary. |
That’s what it looks like. When I look at the traffic in Wireshark, all messages are sent in one frame (Wireshark concept!?), even when they’re very large. This in local on the computer (127.0.0.1). I’ll try a few more scenarios today, but it looks like I’ll need a special handler that creates whole messages, using ‘}{‘ as separator. |
Well, somewhere in the network stack there is a frame concept, but I'm pretty sure it has a maximum size.
Remember that those two characters can legally appear together within a JSON string. So it's not as easy as just searching for that. You'd need to actually parse the JSON to know what context you're in (at least that you're not in a string) when you see them. But yes, this should be doable using a MessageHandler-derived type, which I suggest you write outside this library first and you can use it immediately. If you like what you end up with, we can chat about including it in this repo if you'd like. I'm going to close this issue for now, but if you have more questions feel free to comment more. |
Update PublishCodeCoverageResults task to v2
I'm going to be using JSON RPC (v1.0) to talk to OVSDB over TCP, from a .Net Core app.
The OVSDB implementation does not have any header, so I'll have a header-less Networkstream. I was hoping to find a .Net implementation of JSON RPC that I could use without too much work, and it looks like
vs-streamjsonrpc
is the only.Net Standard
or.Net Core
library out there.Would it be possible to create an handler for a header-less (tcp)stream?
The text was updated successfully, but these errors were encountered: