signalr.client

SignalR and Reactive combo

萝らか妹 提交于 2019-12-08 05:42:05
问题 I found this little gem about how to get SignalR and Rx to play nicely: Rx and Reactive Tutorial However as you might have noticed this only works when going from server -> client. Does anyone know how to go the other way around? I want my framework to be a bit more "message" based like NServiceBus and less RPC (which signalr standard examples tend to be). The reason for this is the weakly typed world doesn't lend itself very well to RPC. On the server side I'd love to be able to put

SignalR, Server side methods can be called, but client side methods cannot, only in production environment

不羁岁月 提交于 2019-12-08 03:52:28
问题 I have successfully developed an hub for my newsletter sending function in a .net website. The server procedure is called by the hub, then during the sending routine, I send a client methods to report the progress status, and finally another client method to report ending of the routine. My dev environment is win10 with IIS 10, VS2013, .NET 4.5 SignalR 2.2.0. I can use websocket in my dev and work fine, but my production server is win 2008r2 (IIS 7.5), so I must use serverSentEvents, working

Signalr Core for ASP.net core 2.0 not working no matter what i try

↘锁芯ラ 提交于 2019-12-07 15:37:32
trying to follow microsoft's video w/ Mikael Mengistu, Jon Galloway, Maria Naggaga. https://channel9.msdn.com/Shows/Code-Conversations/Introduction-to-SignalR-Core-with-Mikael-Mengistu 0. here is what my machine looks like. dotnet --version 2.0.0-preview2-006497 runtime Microsoft .NET Core Shared Framework Host Version : 2.0.0-preview2-25407-01 Visual Studio 2017 15.3 MVC Web Project with Docker Support here is the code repo of my attempt. github.com/zhimaqiao1/SRcoreWorking the signalr-client i had to edit myself to get something at least half working. started with vanilla mvc template which

SignalR 2 long polling “protocol” request times out when not ran locally

百般思念 提交于 2019-12-07 10:01:27
问题 Currently I have an app that is very chatty and needs to be supported by a Singleton(See Code below). I upgraded to SignalR 2.0 and I followed the upgrade guide, but after I deploy it out to an environment, sometimes all requests for every "protocol" fail, and signalr breaks, and when it doesn't break then it is terribly slow to push notifications down to the client from the server, Maybe this has something to do with it using long polling? Here is what my server side code looks like.

SignalR connect to multiple servers

岁酱吖の 提交于 2019-12-07 09:53:43
问题 Is possible to connect using Javascript client to more than one SignalR servers? For example: <script type="text/javascript"> $.connection.hub.url = 'http://server1.net/signalr'; var server1Hub = $.connection.server1Hub; $.connection.hub.start().done(function () { }); // i need to connect to server2 $.connection.hub.url = 'http://server2.net/signalr'; var server2Hub = $.connection.server2Hub; $.connection.hub.start().done(function () { }); </script> Trying to connect (again) the second time

Android client for SignalR does not receive but JS does

家住魔仙堡 提交于 2019-12-07 08:45:51
问题 This is a "hello world" app but I can't find the solution. This is the code on the client: public class MainActivity extends ActionBarActivity { HubProxy proxy; EditText messageText; TextView resultText; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Platform.loadPlatformComponent(new AndroidPlatformComponent()); //Setup connection String server = "http://10.0.2.2:8081/"; HubConnection connection = new

Context is null in SignalR hub

巧了我就是萌 提交于 2019-12-07 07:27:15
问题 I have a Web Forms application and testing to see how SignalR works for one of my requirement. My hub code: using System; using System.Collections.Generic; using System.Linq; using System.Web; using Microsoft.AspNet.SignalR; namespace SignalRTest.Hubs { public class NotificationHub : Hub { public static readonly System.Timers.Timer _Timer = new System.Timers.Timer(); public NotificationHub() { var myInfo = Context.QueryString["myInfo"]; _Timer.Interval = 2000; _Timer.Elapsed += TimerElapsed;

Best Practices for reconnecting a disconnected SignalR client (JS)

拥有回忆 提交于 2019-12-06 06:45:07
问题 I'd like to improve the resilience of my clientside implementation of a signalR client. Currently, I do this: hub.server.sendClientNotification(string, appSettings.username()); However occasionally, an exception related to connectivity is thrown because either the server is not responding or the client's internet connection has become unusable. I'd like to solve this by queuing up requests and then doing something like this: try { // pop from queue hub.server.sendClientNotification(string,

Can I reduce the Circular Buffer to “1”? Is that a good idea?

匆匆过客 提交于 2019-12-06 05:39:44
问题 By default, there are a default of 1,000 messages stored in the ring buffer on the server. It doesn't make sense for me to send a lagging client 1,000 updates, but rather just the most recent update. In WCF I can do this by using volatile data. I suppose I can emulate a volatile approach by reducing the buffer to "1", but not sure if this can be configured on a per hub basis, or ideally, on a per method basis. Does it matter if I use hubs or persistent connections with this? 回答1: Even if you

SignalR 2 long polling “protocol” request times out when not ran locally

家住魔仙堡 提交于 2019-12-05 17:45:51
Currently I have an app that is very chatty and needs to be supported by a Singleton(See Code below). I upgraded to SignalR 2.0 and I followed the upgrade guide, but after I deploy it out to an environment, sometimes all requests for every "protocol" fail, and signalr breaks, and when it doesn't break then it is terribly slow to push notifications down to the client from the server, Maybe this has something to do with it using long polling? Here is what my server side code looks like. Configuration Method in Owin Start up class var hubConfig = new HubConfiguration(); hubConfig