Search code examples
xsockets.net

XSocketController.SendTo replacement method in Xsockets 4.0


What I am trying to do is to recreate that sample with 4.0.

In the WebRTCSample in CustomBroker and ContextHelper files is called a method SentTo witch sends an object as an ITextArgs

obj.SendTo(c => c.Peer.Context.Equals(context), obj.Find(q => q.Peer.Context.Equals(context)).Select(p => p.Peer), Events.Context.Changed);

I know that in 4.0 ( installed into OWIN (IIS)) ITextArgs is replaced with IMessage but I don't know how SendTo method is replaced, what is its replacement ?

Also when i installed the 4.0 version it didn't installed in project any Js files ( XSockets.WebRTC.latest.js etc.) is ok to take the ones from Sample and use them in my new project ?


Solution

  • As of 4.0 all work around WebRTC was removed from the default XSockets package. All code regarding WebRTC can be found on GitHub

    The C# code as well as the JS code is all there. You will not be able to use the old JavaScript files with 4.0...

    When it comes to SendTo etc the thing is that XSockets before 4.0 supported only Publish/Subscribe. In 4.0 XSockets has support for Publish/Subscribe as well as RPC.

    So all SendTo, SendToAll etc was renamed to PublishTo, PublishToAll... And RPC uses InvokeTo, InvokeToAll and so on...

    Regards Uffe