0

I am trying to run the XSockets WebRTC example found here: http://www.nuget.org/packages/xsockets.sample.webrtc

The package installs and displays index.html, however the websockets server does not appear to start. This seems to work since I renamed the CustomBroker to CustomBrokerController.

A couple notes:

1.) I am running Visual Studio 2013 which appears to self host apps under IIS Express only. Per the application readme file, I should be running under Visual Studio Development Server:

Right click the project and select properties.

Under the "Web" tab go to the "Servers" section and set Use Visual Studio Development Server

Is this a problem, if so - how to fix it?

2.) index.html contains this line: conn = new XSockets.WebSocket('ws://127.0.0.1:4502/Broker');

There is no controller named "Broker" in the controller subfolder under the WebRTCSample folder. Though the remote and local video seems to work, none of my breakpoints are getting hit on the CustomBroker controller. Now I noticed that the CustomBroker class under the controller folder does not have the "Controller" name connected to it as in "CustomBrokerController". I renamed it from "CustomBroker" to "CustomBrokerController" and now I am hitting breakpoints, but on the client index.html page, if I open up two separate windows and pass the same context as querystring the remote video section does not display. The weird thing is that from the console on the client side, I see an object array that seems to hold a list of the connections and seems to accurately reflect the amount of remote connections I have.

3.) I added a XSocketsBootstrapper per the readme file. I added this file to the App_Start folder as per the instructions.

UPDATE:

I created a new project and added XSockets.WebRTC files using the library manager. I hit the home controller to invoke the BootStrapper and the breakpoint triggered. It also hit the breakpoints for the CustomBroker after I changed the name from Broker to CustomBroker. Now, after I refresh the index.html page, none of the breakpoints are called from the CustomBroker. Should this be happening? I would think that when this line is reached in javascript, peerBroker = new XSockets.WebSocket("ws://127.0.0.1:4502/CustomBroker"); the controller events would fire. Am I missing something?

user1790300
  • 2,143
  • 10
  • 54
  • 123

1 Answers1

0

Just to be sure I tried it my self without any issues.

Renaming CustomBroker to CustomBrokerController will do make any difference since the Controller part is a suffix.

Lost you in step 2, will try your exact steps later and let you know the result.

Uffe
  • 2,275
  • 1
  • 13
  • 9
  • conn = new XSockets.WebSocket('ws://127.0.0.1:4502/Broker'); For this line, there is a controller under the controller subfolder in the WebRTCSample folder named CustomBroker and the breakpoints never get hit on this controller. It seems like it should be named CustomBroker to match the one under the Controller folder or am I missing a step? – user1790300 May 27 '14 at 13:08
  • Well... the "Broker" is the built in controller that is located in the assembly named XSockets.WebRTC. That is the one used by default. The controller named CustomBroker is really just to show the code, but you can use that one as well. Just change the connectionstring to use CustomBroker instead of Broker and it works. Tried both scenarios on my machine without any problems... – Uffe May 27 '14 at 14:21
  • Not sure how used you are to VS, but if the server does not start just call any server-side resource (root will be fine) and the server will start. Since I run VS2012 I do not need to do that, but if you are on 2013 you might have to. – Uffe May 27 '14 at 14:23
  • I called a server-side resource and hit the breakpoint for the Bootstrapper but not for any of the methods in the "CustomBroker" controller. For the example you downloaded did you run as is or did you have to make any modifications. Also, I am running vs2013. – user1790300 May 27 '14 at 14:27
  • I am also running mvc5. – user1790300 May 27 '14 at 14:33
  • No modifications is needed to get it to work. if you want to debug the controller change the connectionstring to use "CustomBroker". That was the only steps I took, both worked. – Uffe May 27 '14 at 14:33
  • MVC version does not matter, it is only a HTML page. And XSockets is stand-alone... Does not use MVC. You could actually run this on any webserver and connect to xsockets running is as an external service or executable etc – Uffe May 27 '14 at 14:34
  • Did you get your version from the library package installer? – user1790300 May 27 '14 at 14:44
  • Question: With the call going to Broker and not CustomBroker, what controller is actually getting called? – user1790300 May 27 '14 at 15:14
  • The built in controller in the XSockets.WebRTC.dll assembly The other one (CustomBroker) is just there so that you can actually see the code and understand it. It is the same code as in the assembly but with a different class name... – Uffe May 27 '14 at 16:14
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/54644/discussion-between-user1790300-and-uffe). – user1790300 May 28 '14 at 14:51