cburgdorf / signalr.reactive Goto Github PK
View Code? Open in Web Editor NEWLaying the power of the Reactive Extensions on top of SignalR
License: MIT License
Laying the power of the Reactive Extensions on top of SignalR
License: MIT License
While it is cool as it stands out for itself, there is actually no reason why you should manually add an Observable property to the hub just to use it as an typesafe way for the mapping. In an earlier version the proxy generation depended on the Observable property to be there. However, thats no longer the case. We should consider to remove it.
It would be cool if we could say clientside
$('#inputTextArea')
.toObservable('keydown')
.toServerside("ConverterHub", "IncomingText");
converterHub
.observe("OutgoingText")
.subscribe(function(char){
$('#outputTextArea').append(char);
});
And then serverside:
class ConverterHub: ReactiveHub
{
public ConverterHub()
{
Observe<string>("IncomingText")
.Select(x => x.toUpper())
.ToClientside().Observable<ConverterHub>("OutgoingText");
}
}
To reproduce:
You'll get an "Uncaught TypeError: Converting circular structure to JSON" when SignalR tries to JSON.stringify the hub object's subject field.
It looks like the Rx.Subject from the latest version of the library now has an 'observers' field which has the circular reference.
Hi,
After upgrading from 0.5.X to last version (1.0.1), using extension method "ToClientside" failed.
I'm no longer able to publish event to 1 user (ConnectionId).
Using AspNet.SignalR >= v1.0 I think you should use clients.Client[clientName] within the following RxHelper method:
public static dynamic GetHubClients(dynamic clients, string clientName)
{
return string.IsNullOrEmpty(clientName) ? clients.All : clients[clientName];
}
Hope you will be able to fix it quickly because I have already update SignalR to last version.
I'm sorry i can't do it by myself because i'm quite new to GitHub and i don't have VS 2012.
I'm still using VS 2010.
Regards,
David
Hi,
SignalR.Reactive with SignalR 0.5.3 version doesn't work.
Getting error with GenerateProxy method not implemented by RxJsProxyGenerator (IJavaScriptProxyGenerator).
Do you plan to update this package soon ?
Thanks for your answer.
Cheers,
David
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.