signalr.client

Setting up Signal R in Android: Crash/Hung Issue

杀马特。学长 韩版系。学妹 提交于 2019-12-02 05:15:27
I followed THIS tutorial to set up a .NET Backend for my Android app to implement Signal R. I set up a SignalR Self-Hosted backend. Here's my Backend Code in a Console Project: namespace SignalRSelfHost { class Program { static void Main(string[] args) { // This will *ONLY* bind to localhost, if you want to bind to all addresses // use http://*:8080 to bind to all addresses. // See http://msdn.microsoft.com/en-us/library/system.net.httplistener.aspx // for more information. string url = "http://localhost:8080"; using (WebApp.Start(url)) { Console.WriteLine("Server running on {0}", url);

signalR MVC site loads indefinitely after signalR install [closed]

落花浮王杯 提交于 2019-12-02 04:12:49
I created a brand new MVC4 app. Installed new signalR package from NuGet: Install-Package Microsoft.AspNet.SignalR –pre Whenever I run it, it loads indefinitely. I know it is caused by SignalR => App_Start/RegisterHubs that was added during install because it never gets passed " RouteTable.Routes.MapHubs(); " line when in debug. tried it on several machines running windows 7 and Vs2012 and IIS Express what gives?? thanks UPDATE: I just tried it on my home computer. Created a brand new MVC4 app, ran nuget package install and IT WORKS FINE! :) (same set up vs2012, win7, IIS express). This is

SignalR & WebApi - colliding Newtonsoft.Json references

。_饼干妹妹 提交于 2019-12-01 16:03:17
I have a windows client that connects to a SignalR 2.0 back-end, now I am trying to make it connect to a ASP.NET Web API 2.1 back-end as well. The library that I use to communicate with the web api relies on Newtonsoft.Json 6.0.0.0 but the Microsoft.AspNet.SignalR.Client 2.0.0.0 seems to rely on Newtonsoft.Json 4.5.0.0 . Since this is a windows client the dll-files end up in the same directory and only one of the two required versions will end up on disk, making either the signalr-client or the HttpClient fail to load its version of the Newtonsoft.Json dll file. SignalR error if the 6.*

How to send big data via SignalR in .NET client

不羁岁月 提交于 2019-12-01 15:53:42
We have a .NET client, which use SignalR to call Server method, but the parameter seems very big, for such scenario how to fix it? Client code: public async Task FooAsync() { var hubConnection = new HubConnection(...); await hubConnection.Start(); var hubProxy = hubConnection.CreateHubProcx("ValueHub"); //the content is very long, about 11776065 bytes (11MB) var content = File.ReadAllText(...); hubProxy.Invoke("Send", content); ... } Server code: [HubName("ValueHub")] public class ValueHub : Hub { public void Send(string json) { } } From the exception stack and source code, I found the SignalR

How to send big data via SignalR in .NET client

折月煮酒 提交于 2019-12-01 14:58:41
问题 We have a .NET client, which use SignalR to call Server method, but the parameter seems very big, for such scenario how to fix it? Client code: public async Task FooAsync() { var hubConnection = new HubConnection(...); await hubConnection.Start(); var hubProxy = hubConnection.CreateHubProcx("ValueHub"); //the content is very long, about 11776065 bytes (11MB) var content = File.ReadAllText(...); hubProxy.Invoke("Send", content); ... } Server code: [HubName("ValueHub")] public class ValueHub :

SignalR & WebApi - colliding Newtonsoft.Json references

一曲冷凌霜 提交于 2019-12-01 14:10:33
问题 I have a windows client that connects to a SignalR 2.0 back-end, now I am trying to make it connect to a ASP.NET Web API 2.1 back-end as well. The library that I use to communicate with the web api relies on Newtonsoft.Json 6.0.0.0 but the Microsoft.AspNet.SignalR.Client 2.0.0.0 seems to rely on Newtonsoft.Json 4.5.0.0 . Since this is a windows client the dll-files end up in the same directory and only one of the two required versions will end up on disk, making either the signalr-client or

How do I add Group support to a mocked Client in a SignalR 2.x unit testing framework?

纵然是瞬间 提交于 2019-12-01 06:01:35
I'm using Moq to build up a UnitTest framework for my SignalR 2.x application. I am currently mocking up my Clients by: var mockClients = new Mock<IHubCallerConnectionContext>(); Clients = mockClients.Object; In order to test, I need to test sending messages by Group: Clients.Group(groupName).sendSomeMessage(message); How do I add Group support to my mocked up Client? Check this: https://github.com/SignalR/SignalR/blob/release/tests/Microsoft.AspNet.SignalR.Tests/Server/Hubs/HubFacts.cs public void HubsGroupAreMockable() { var hub = new MyTestableHub(); var mockClients = new Mock

How do I add Group support to a mocked Client in a SignalR 2.x unit testing framework?

扶醉桌前 提交于 2019-12-01 03:45:28
问题 I'm using Moq to build up a UnitTest framework for my SignalR 2.x application. I am currently mocking up my Clients by: var mockClients = new Mock<IHubCallerConnectionContext>(); Clients = mockClients.Object; In order to test, I need to test sending messages by Group: Clients.Group(groupName).sendSomeMessage(message); How do I add Group support to my mocked up Client? 回答1: Check this: https://github.com/SignalR/SignalR/blob/release/tests/Microsoft.AspNet.SignalR.Tests/Server/Hubs/HubFacts.cs

SignalR: How to call .Net client method from server?

萝らか妹 提交于 2019-11-30 07:15:02
问题 I want to send data to my console application wich have a connection to my "someHub". I tried to do as described in example from a link but got no result. Server side code: [HubName("somehub")] public class SomeHub : Hub { public override Task OnConnected() { //Here I want to send "hello" on my sonsole application Clients.Caller.sendSomeData("hello"); return base.OnConnected(); } } Clien side code: public class Provider { protected HubConnection Connection; private IHubProxy _someHub; public

SignalR integration in android studio

拥有回忆 提交于 2019-11-30 06:24:19
问题 I use signalR lib in my project. but I was not able to compile libs of https://github.com/SignalR/java-client on my own - I found them in internet. But it seems like there are not full (WebsocketTransport is missing) When I compile https://github.com/SignalR/java-client, i get two libs, and paste them to my app.gradle - compile files ('libs/signalr-client-sdk.jar') compile files ('libs/signalr-client-sdk-android.jar') Progects build suckesfully, butwhen I press run - it fails. Here is stack