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 ?

viktorfilim
  • 135
  • 2
  • 10

1 Answers1

0

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

Uffe
  • 2,275
  • 1
  • 13
  • 9
  • thank you, few more questions if you don't mind, if I use the version installed into OWIN(IIS) is it necessary to add a WebBootstrapper? Is there a way to assign a conectionId to a peer automatically ( like SignalR [link HERE](http://www.asp.net/signalr/overview/signalr-20/hubs-api/mapping-users-to-connections#IUserIdProvider) ) so i can call a user using the id that I have in my database ? And the last question , in the WebRTCSample v3.x on a `peerBrock = new XSocket.WebSocket"ip")` you have available the function `peerBroker.on(XSockets.Events.open, function (b)` in 4.0 is not available? – viktorfilim Sep 12 '14 at 13:05
  • 1: No you do not need the bootstrapper if using Owin. See http://xsockets.net/docs/4/installing-xsocketsnet 2: XSockets is much more sophisticated when it comes to sending to specific clients see "InvokeTo" http://xsockets.net/docs/4/rpc 3: The API´s are rewritten due to the fact that we now multiplex over several controller on one connection. To complex to describe in a comment. Ask a new question or send us an email. – Uffe Sep 15 '14 at 05:44