-
Notifications
You must be signed in to change notification settings - Fork 84
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
Seems HostMetaApiService does not work for method (topic) registration #110
Comments
Hi Roman, This seems to work fine with Json serialization but doesn't work with msgpack serialization. I think it is related to the way I serialize DateTime in Newtonsoft.Msgpack. I will try to investigate this further during the weekend. Elad |
Ok - the problem is that Newtonsoft.Msgpack serializes DateTime as a number (like msgpack-cli does) and after that WampSharp deserializes the object first into a JToken and later to a RegistrationDetails, but now when JTokenReader occurs a number, it doesn't attempt to convert it into a DateTime. It seems that crossbar sends DateTime as a string, which is less compact but seems more compatible (other WAMP implementations might not know how to convert a number to a DateTime). I guess we should add an option to Newtonsoft.Msgpack MessagePackReader to write DateTime as string and use it in WampSharp. Elad |
Ok, I've removed MsgpackSerialization from that example and put JsonSerialization instead. Now it does not work (RPC un-register) when using RawSocketTransport (for Callee) instead of WebSocketTransport: https://gist.github.com/nj4x/92c118ed9ca57461755a |
Hi, I'm not sure why the router doesn't detect the client disconnection. Adding auto-pings eventually fixes this. (Set the autoPingInterval of the RawSocketTransport) I'm not sure why an exception doesn't occur on the router side when the client disconnects without this. Elad |
Added AutoPing(TimeSpan.FromSeconds(2)) - did not help. Subsequent RPC registrations also does not work: |
Yeah, that's because you need to add to router side (so the router will detect disconnection): defaultWampHost.RegisterTransport(new RawSocketTransport(new TcpListener(8090), autoPingInterval: TimeSpan.FromSeconds(20)), new JTokenJsonBinding(), new JTokenMsgpackBinding()); |
Ok, got it - ReadAsync returns 0 if the end of the stream has been reached. Will try to fix this. |
Hi Roman, Just released a new version to MyGet with a fix. Should work also without auto-pings :) Elad |
Thanks, Elad. MetaApiService works on RawSocketTransport/JsonSerialization now. On Sat, 28 Nov 2015 at 18:11 Elad Zelingher [email protected]
|
Hi Roman, Elad |
Thank you very much, Elad. On Mon, 30 Nov 2015 at 14:39 Elad Zelingher [email protected]
|
Hello, Elad.
Please use this gist: https://gist.github.com/nj4x/dab94f833ca1e973623b to reproduce my case.
(WampSharp 1.2.4.111-dev)
The text was updated successfully, but these errors were encountered: