How to Run this code.
-
Open this code into two instances of Visual studio.
-
Set startup Project Demo in instance 1 and start it. Put a debug point as mentioned in the below snap. DO NOT MOVE CODE UNTILL STEPS 5 REACHED . THERE IS INFO WHEN TO MOVE FORWARD.
-
In the second intance of visual studio set DemoHub.Client as a startup project. Put a breakpont as mentioned in the below snap.
-
Run Client as well and you get a connectionId in the console.
-
Since there is a bearKpoint set in step 2 in server code. So the server code will be bloked and after 30 seconds client will try to reconnect.
-
Now Press F5 in server app.
-
Now Press F5 in the Client code.
OUTPUT: New connection Id recived for Client.