signalr

SignalR as a Game Server [closed]

巧了我就是萌 提交于 2019-12-24 03:54:07
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I have a board game application that I would like to add multiplayer options, I'm considering using SignalR to do a persistant connection. I'm wondering whether anyone has done something like this, or whether there is an opensource project available that I can have a look at ? 回答1: There is a game written in

What is the equivalent of HttpContext.GetOwinContext() from a Hub?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-24 03:50:58
问题 I made a OWIN SignalR server self-hosted in a console app. From an example that is hosting SignalR in a ASP.NET MVC application instead (in IIS), I see this line of code: var authenticateResult = await HttpContext.GetOwinContext().Authentication.AuthenticateAsync("ExternalCookie"); I do not have access to HttpContext in my console app (and do not want to reference the System.Web.Mvc assembly if possible). What would be the equivalent of HttpContext.GetOwinContext() in my SignalR hub class?

How to use StackExchange.Redis ConnectionMultiplexer with SignalR.Redis (2.2)

夙愿已清 提交于 2019-12-24 03:36:22
问题 Currently SignalR.Redis is using Booksleeve. However, SignalR.Redis has now migrated to StackExchange.Redis instead of Booksleave in the signalR.Redis (2.2 Dev Branch). We can still specify a single Redis server using the same code after upgrading to 2.2: GlobalHost.DependencyResolver.UseRedis("localhost", 6379, string.Empty, "myApp"); However, I am now wondering how I can use the ConnectionMultiplexer (available in StackExchange.Redis) to specify multiple servers with SignalR.Redis (instead

SignalR dependency injection via Spring.Net

淺唱寂寞╮ 提交于 2019-12-24 03:32:27
问题 I'm trying to inject dependencies via Spring.NET. First I created a custom DependencyResolver: public class SignalRSpringNetDependencyResolver : DefaultDependencyResolver { private IApplicationContext _context; public SignalRSpringNetDependencyResolver(IApplicationContext context) { _context = context; } /// <summary> /// Gets the application context. /// </summary> /// <value>The application context.</value> public IApplicationContext ApplicationContext { get { if (_context == null ||

SignalR datetime format

拥有回忆 提交于 2019-12-24 02:39:15
问题 I'm using SignalR in my server side code c# .net4. On client I'm using javascript. when I Invoke client method from server ,for example Caller.ShowDate(DateTime.Now); client side javascript gets value of "2012-11-13T19:02:39.3386544+02:00" as string. How can I use It as Date in javascript ? 回答1: Keep in mind that client times can be VASTLY different than server times due to time zones/clients modifying clocks etc. That being said: C#: Caller.ShowDate(DateTime.UtcNow); JavaScript: myHub.client

AngularJS Promises $q.all and SignalR

匆匆过客 提交于 2019-12-24 02:28:04
问题 I have checked number of answers regarding promises, but I can't get my code working (perhaps I'm doing something terribly wrong in other place) In general I'm working on small test application using AngularJS and SignalR. I have signalR service which looks like this: (function () { 'use strict'; var serviceId = 'signalRSvc'; angular.module('app').service(serviceId, ['$rootScope', signalrcontext]); function signalrcontext( $rootScope) { var performanceHub = null; var connection = null; var

Javascript's super constructor - clarification?

為{幸葍}努か 提交于 2019-12-24 02:05:42
问题 I've been watching this video where Damian said that Crockford called it :" super constructor pattern" Code sample : ( from the video) var signalR; signalR = function (url){ return new signalR.prototype.init(url); } signalR.prototype={ init:function(url) { this.url=url; } } signalR.prototype.init.prototype = signalR.prototype; Now, I've googled about Crockford and super constructor but all I could find is the implementation of Object.create : Which I understand pretty clear : ( also it's

SQL Query Notifications do not always work in scaleout setup (SQL Server)

一个人想着一个人 提交于 2019-12-24 01:18:44
问题 SQL Query Notifications do not always work in our environment. They seem to work for a little while, and then we get an ArgumentException (Invalid token for impersonation - it cannot be duplicated) exception on SqlDependency.Start(...) method call, and SqlMessageBus falls back to using polling mechanism. After that, SQL Query Notifications are not attempted until the SQL message bus has been disposed. It seems that, SqlMessageBus doesn't always see that SqlDependency has already been started

How to connect to SignalR server, from Xamarin client?

最后都变了- 提交于 2019-12-24 01:02:01
问题 (**) I created an ASP.NET web server, hosting SignalR hub. I followed this tutorial. It works. Then I created a Xamarin.Android client(*). The problem is I can't connected to the server. I think, I can't connected because of "localhost" in my host address. The exception is pretty big. If my suspicions are correct, how can I work around? How can I make localhost looks like normal server? (*) - I also tried with Xamarin.Forms in general. (**) - Please, look at the "EDIT" at the bottom of the

SignalR Self Host Disconnect TimeOut Without Global.asax

一笑奈何 提交于 2019-12-24 00:53:29
问题 I'm using SignalR 2.0 self-hosted with OWIN. I am trying to modify the SignalR ConnectionTimeout property, but it does not seem to work with the OWIN Startup class. Current Attempt using System; using Microsoft.AspNet.SignalR; using Microsoft.Owin.Cors; using Owin; namespace Test { internal class Startup { public void Configuration(IAppBuilder app) { GlobalHost.Configuration.ConnectionTimeout = TimeSpan.FromSeconds(10); app.UseCors(CorsOptions.AllowAll); app.MapSignalR(); } } } I have also