Suche senden
Hochladen
SignalR
•
10 gefällt mir
•
4,217 views
Eyal Vardi
Folgen
SignalR Communication
Weniger lesen
Mehr lesen
Technologie
Melden
Teilen
Melden
Teilen
1 von 40
Empfohlen
SignalR with asp.net
SignalR with asp.net
Martin Bodocky
SignalR With ASP.Net part1
SignalR With ASP.Net part1
Esraa Ammar
Real time Communication with Signalr (Android Client)
Real time Communication with Signalr (Android Client)
Deepak Gupta
Intro to signalR
Intro to signalR
Mindfire Solutions
Introduction to SignalR
Introduction to SignalR
University of Hawai‘i at Mānoa
Introduction to SignalR
Introduction to SignalR
Adam Mokan
Building Realtime Web Applications With ASP.NET SignalR
Building Realtime Web Applications With ASP.NET SignalR
Shravan Kumar Kasagoni
Real time web applications with SignalR (BNE .NET UG)
Real time web applications with SignalR (BNE .NET UG)
brendankowitz
Empfohlen
SignalR with asp.net
SignalR with asp.net
Martin Bodocky
SignalR With ASP.Net part1
SignalR With ASP.Net part1
Esraa Ammar
Real time Communication with Signalr (Android Client)
Real time Communication with Signalr (Android Client)
Deepak Gupta
Intro to signalR
Intro to signalR
Mindfire Solutions
Introduction to SignalR
Introduction to SignalR
University of Hawai‘i at Mānoa
Introduction to SignalR
Introduction to SignalR
Adam Mokan
Building Realtime Web Applications With ASP.NET SignalR
Building Realtime Web Applications With ASP.NET SignalR
Shravan Kumar Kasagoni
Real time web applications with SignalR (BNE .NET UG)
Real time web applications with SignalR (BNE .NET UG)
brendankowitz
SignalR Overview
SignalR Overview
Michael Sukachev
Signalr with ASP.Net part2
Signalr with ASP.Net part2
Esraa Ammar
Clean up this mess - API Gateway & Service Discovery in .NET
Clean up this mess - API Gateway & Service Discovery in .NET
Marcin Tyborowski
Enjoying the Move from WCF to the Web API
Enjoying the Move from WCF to the Web API
Kevin Hazzard
Architecting &Building Scalable Secure Web API
Architecting &Building Scalable Secure Web API
SHAKIL AKHTAR
Encode x NEAR: Technical Overview of NEAR 1
Encode x NEAR: Technical Overview of NEAR 1
KlaraOrban
Web Real-time Communications
Web Real-time Communications
Alexei Skachykhin
Building Fast and Scalable Persistence Layers with Spring Data JPA
Building Fast and Scalable Persistence Layers with Spring Data JPA
VMware Tanzu
Building API-Driven Microservices with Amazon API Gateway - AWS Online Tech T...
Building API-Driven Microservices with Amazon API Gateway - AWS Online Tech T...
Amazon Web Services
Aws Technical Day 2015 - Amazon API Gateway
Aws Technical Day 2015 - Amazon API Gateway
aws-marketing-il
Asp.Net Core MVC , Razor page , Entity Framework Core
Asp.Net Core MVC , Razor page , Entity Framework Core
mohamed elshafey
Server Sent Events, Async Servlet, Web Sockets and JSON; born to work together!
Server Sent Events, Async Servlet, Web Sockets and JSON; born to work together!
Masoud Kalali
Server-Sent Events in Action
Server-Sent Events in Action
Andrei Rusu
Server side
Server side
philipsinter
Web services - A Practical Approach
Web services - A Practical Approach
Madhaiyan Muthu
Developing and Hosting SOAP Based Services
Developing and Hosting SOAP Based Services
StephenKardian
AWS July Webinar Series - Overview Build and Manage your APs with amazon api ...
AWS July Webinar Series - Overview Build and Manage your APs with amazon api ...
Amazon Web Services
10 Tricks and Tips for WCF
10 Tricks and Tips for WCF
Barry Dorrans
(DEV203) Amazon API Gateway & AWS Lambda to Build Secure APIs
(DEV203) Amazon API Gateway & AWS Lambda to Build Secure APIs
Amazon Web Services
AWS API Gateway - AJUG August 2018
AWS API Gateway - AJUG August 2018
Yoel Spotts
SignalR
SignalR
Troy Miles
«Real Time» Web Applications with SignalR in ASP.NET
«Real Time» Web Applications with SignalR in ASP.NET
Alessandro Giorgetti
Weitere ähnliche Inhalte
Was ist angesagt?
SignalR Overview
SignalR Overview
Michael Sukachev
Signalr with ASP.Net part2
Signalr with ASP.Net part2
Esraa Ammar
Clean up this mess - API Gateway & Service Discovery in .NET
Clean up this mess - API Gateway & Service Discovery in .NET
Marcin Tyborowski
Enjoying the Move from WCF to the Web API
Enjoying the Move from WCF to the Web API
Kevin Hazzard
Architecting &Building Scalable Secure Web API
Architecting &Building Scalable Secure Web API
SHAKIL AKHTAR
Encode x NEAR: Technical Overview of NEAR 1
Encode x NEAR: Technical Overview of NEAR 1
KlaraOrban
Web Real-time Communications
Web Real-time Communications
Alexei Skachykhin
Building Fast and Scalable Persistence Layers with Spring Data JPA
Building Fast and Scalable Persistence Layers with Spring Data JPA
VMware Tanzu
Building API-Driven Microservices with Amazon API Gateway - AWS Online Tech T...
Building API-Driven Microservices with Amazon API Gateway - AWS Online Tech T...
Amazon Web Services
Aws Technical Day 2015 - Amazon API Gateway
Aws Technical Day 2015 - Amazon API Gateway
aws-marketing-il
Asp.Net Core MVC , Razor page , Entity Framework Core
Asp.Net Core MVC , Razor page , Entity Framework Core
mohamed elshafey
Server Sent Events, Async Servlet, Web Sockets and JSON; born to work together!
Server Sent Events, Async Servlet, Web Sockets and JSON; born to work together!
Masoud Kalali
Server-Sent Events in Action
Server-Sent Events in Action
Andrei Rusu
Server side
Server side
philipsinter
Web services - A Practical Approach
Web services - A Practical Approach
Madhaiyan Muthu
Developing and Hosting SOAP Based Services
Developing and Hosting SOAP Based Services
StephenKardian
AWS July Webinar Series - Overview Build and Manage your APs with amazon api ...
AWS July Webinar Series - Overview Build and Manage your APs with amazon api ...
Amazon Web Services
10 Tricks and Tips for WCF
10 Tricks and Tips for WCF
Barry Dorrans
(DEV203) Amazon API Gateway & AWS Lambda to Build Secure APIs
(DEV203) Amazon API Gateway & AWS Lambda to Build Secure APIs
Amazon Web Services
AWS API Gateway - AJUG August 2018
AWS API Gateway - AJUG August 2018
Yoel Spotts
Was ist angesagt?
(20)
SignalR Overview
SignalR Overview
Signalr with ASP.Net part2
Signalr with ASP.Net part2
Clean up this mess - API Gateway & Service Discovery in .NET
Clean up this mess - API Gateway & Service Discovery in .NET
Enjoying the Move from WCF to the Web API
Enjoying the Move from WCF to the Web API
Architecting &Building Scalable Secure Web API
Architecting &Building Scalable Secure Web API
Encode x NEAR: Technical Overview of NEAR 1
Encode x NEAR: Technical Overview of NEAR 1
Web Real-time Communications
Web Real-time Communications
Building Fast and Scalable Persistence Layers with Spring Data JPA
Building Fast and Scalable Persistence Layers with Spring Data JPA
Building API-Driven Microservices with Amazon API Gateway - AWS Online Tech T...
Building API-Driven Microservices with Amazon API Gateway - AWS Online Tech T...
Aws Technical Day 2015 - Amazon API Gateway
Aws Technical Day 2015 - Amazon API Gateway
Asp.Net Core MVC , Razor page , Entity Framework Core
Asp.Net Core MVC , Razor page , Entity Framework Core
Server Sent Events, Async Servlet, Web Sockets and JSON; born to work together!
Server Sent Events, Async Servlet, Web Sockets and JSON; born to work together!
Server-Sent Events in Action
Server-Sent Events in Action
Server side
Server side
Web services - A Practical Approach
Web services - A Practical Approach
Developing and Hosting SOAP Based Services
Developing and Hosting SOAP Based Services
AWS July Webinar Series - Overview Build and Manage your APs with amazon api ...
AWS July Webinar Series - Overview Build and Manage your APs with amazon api ...
10 Tricks and Tips for WCF
10 Tricks and Tips for WCF
(DEV203) Amazon API Gateway & AWS Lambda to Build Secure APIs
(DEV203) Amazon API Gateway & AWS Lambda to Build Secure APIs
AWS API Gateway - AJUG August 2018
AWS API Gateway - AJUG August 2018
Andere mochten auch
SignalR
SignalR
Troy Miles
«Real Time» Web Applications with SignalR in ASP.NET
«Real Time» Web Applications with SignalR in ASP.NET
Alessandro Giorgetti
SignalR
SignalR
Slawomir Dorzak
SignalR
SignalR
William Austin
Signal R 2015
Signal R 2015
Mihai Coscodan
ELEIÇÕES 2012 - ASTORGA: Toninho 31123
ELEIÇÕES 2012 - ASTORGA: Toninho 31123
Joao Carlos Passari
Real time web with SignalR
Real time web with SignalR
Alessandro Melchiori
Real-time ASP.NET with SignalR
Real-time ASP.NET with SignalR
Alexander Konduforov
SignalR for ASP.NET Developers
SignalR for ASP.NET Developers
Shivanand Arur
Anatomy of a Modern Node.js Application Architecture
Anatomy of a Modern Node.js Application Architecture
AppDynamics
Real Time Data Visualization using asp.net / SignalR + D3.js
Real Time Data Visualization using asp.net / SignalR + D3.js
Sunny Sharma
Andere mochten auch
(11)
SignalR
SignalR
«Real Time» Web Applications with SignalR in ASP.NET
«Real Time» Web Applications with SignalR in ASP.NET
SignalR
SignalR
SignalR
SignalR
Signal R 2015
Signal R 2015
ELEIÇÕES 2012 - ASTORGA: Toninho 31123
ELEIÇÕES 2012 - ASTORGA: Toninho 31123
Real time web with SignalR
Real time web with SignalR
Real-time ASP.NET with SignalR
Real-time ASP.NET with SignalR
SignalR for ASP.NET Developers
SignalR for ASP.NET Developers
Anatomy of a Modern Node.js Application Architecture
Anatomy of a Modern Node.js Application Architecture
Real Time Data Visualization using asp.net / SignalR + D3.js
Real Time Data Visualization using asp.net / SignalR + D3.js
Ähnlich wie SignalR
Consul: Service Mesh for Microservices
Consul: Service Mesh for Microservices
ArmonDadgar
Models
Models
Eyal Vardi
Introduction To Dot Net Siddhesh
Introduction To Dot Net Siddhesh
Siddhesh Bhobe
Asp.net mvc internals & extensibility
Asp.net mvc internals & extensibility
Eyal Vardi
introduction to Windows Comunication Foundation
introduction to Windows Comunication Foundation
redaxe12
Oop2008 RESTful services with GWT and Apache CXF
Oop2008 RESTful services with GWT and Apache CXF
Adrian Trenaman
The use of Symfony2 @ Overblog
The use of Symfony2 @ Overblog
Xavier Hausherr
Windows Azure Mobile Services
Windows Azure Mobile Services
Sasha Goldshtein
Asp.Net Mvc Internals & Extensibility
Asp.Net Mvc Internals & Extensibility
Eyal Vardi
Fiware IoT_IDAS_intro_ul20_v2
Fiware IoT_IDAS_intro_ul20_v2
FIWARE
Corba model ppt
Corba model ppt
Saransh Garg
solc-verify: A Modular Verifier for Solidity Smart Contracts
solc-verify: A Modular Verifier for Solidity Smart Contracts
Akos Hajdu
Java client socket-20070327
Java client socket-20070327
Tsu-Fen Han
OneTeam Media Server
OneTeam Media Server
Mickaël Rémond
Architecture your android_application
Architecture your android_application
Mark Brady
Creating a Java Internet of Things Gateway
Creating a Java Internet of Things Gateway
Eurotech
Iphone client-server app with Rails backend (v3)
Iphone client-server app with Rails backend (v3)
Sujee Maniyam
以Device Shadows與Rules Engine串聯實體世界
以Device Shadows與Rules Engine串聯實體世界
Amazon Web Services
Networking and Data Access with Eqela
Networking and Data Access with Eqela
jobandesther
Prism Navigation
Prism Navigation
Eyal Vardi
Ähnlich wie SignalR
(20)
Consul: Service Mesh for Microservices
Consul: Service Mesh for Microservices
Models
Models
Introduction To Dot Net Siddhesh
Introduction To Dot Net Siddhesh
Asp.net mvc internals & extensibility
Asp.net mvc internals & extensibility
introduction to Windows Comunication Foundation
introduction to Windows Comunication Foundation
Oop2008 RESTful services with GWT and Apache CXF
Oop2008 RESTful services with GWT and Apache CXF
The use of Symfony2 @ Overblog
The use of Symfony2 @ Overblog
Windows Azure Mobile Services
Windows Azure Mobile Services
Asp.Net Mvc Internals & Extensibility
Asp.Net Mvc Internals & Extensibility
Fiware IoT_IDAS_intro_ul20_v2
Fiware IoT_IDAS_intro_ul20_v2
Corba model ppt
Corba model ppt
solc-verify: A Modular Verifier for Solidity Smart Contracts
solc-verify: A Modular Verifier for Solidity Smart Contracts
Java client socket-20070327
Java client socket-20070327
OneTeam Media Server
OneTeam Media Server
Architecture your android_application
Architecture your android_application
Creating a Java Internet of Things Gateway
Creating a Java Internet of Things Gateway
Iphone client-server app with Rails backend (v3)
Iphone client-server app with Rails backend (v3)
以Device Shadows與Rules Engine串聯實體世界
以Device Shadows與Rules Engine串聯實體世界
Networking and Data Access with Eqela
Networking and Data Access with Eqela
Prism Navigation
Prism Navigation
Mehr von Eyal Vardi
Why magic
Why magic
Eyal Vardi
Smart Contract
Smart Contract
Eyal Vardi
Rachel's grandmother's recipes
Rachel's grandmother's recipes
Eyal Vardi
Performance Optimization In Angular 2
Performance Optimization In Angular 2
Eyal Vardi
Angular 2 Architecture (Bucharest 26/10/2016)
Angular 2 Architecture (Bucharest 26/10/2016)
Eyal Vardi
Angular 2 NgModule
Angular 2 NgModule
Eyal Vardi
Upgrading from Angular 1.x to Angular 2.x
Upgrading from Angular 1.x to Angular 2.x
Eyal Vardi
Angular 2 - Ahead of-time Compilation
Angular 2 - Ahead of-time Compilation
Eyal Vardi
Routing And Navigation
Routing And Navigation
Eyal Vardi
Angular 2 Architecture
Angular 2 Architecture
Eyal Vardi
Angular 1.x vs. Angular 2.x
Angular 1.x vs. Angular 2.x
Eyal Vardi
Angular 2.0 Views
Angular 2.0 Views
Eyal Vardi
Component lifecycle hooks in Angular 2.0
Component lifecycle hooks in Angular 2.0
Eyal Vardi
Template syntax in Angular 2.0
Template syntax in Angular 2.0
Eyal Vardi
Http Communication in Angular 2.0
Http Communication in Angular 2.0
Eyal Vardi
Angular 2.0 Dependency injection
Angular 2.0 Dependency injection
Eyal Vardi
Angular 2.0 Routing and Navigation
Angular 2.0 Routing and Navigation
Eyal Vardi
Async & Parallel in JavaScript
Async & Parallel in JavaScript
Eyal Vardi
Angular 2.0 Pipes
Angular 2.0 Pipes
Eyal Vardi
Angular 2.0 forms
Angular 2.0 forms
Eyal Vardi
Mehr von Eyal Vardi
(20)
Why magic
Why magic
Smart Contract
Smart Contract
Rachel's grandmother's recipes
Rachel's grandmother's recipes
Performance Optimization In Angular 2
Performance Optimization In Angular 2
Angular 2 Architecture (Bucharest 26/10/2016)
Angular 2 Architecture (Bucharest 26/10/2016)
Angular 2 NgModule
Angular 2 NgModule
Upgrading from Angular 1.x to Angular 2.x
Upgrading from Angular 1.x to Angular 2.x
Angular 2 - Ahead of-time Compilation
Angular 2 - Ahead of-time Compilation
Routing And Navigation
Routing And Navigation
Angular 2 Architecture
Angular 2 Architecture
Angular 1.x vs. Angular 2.x
Angular 1.x vs. Angular 2.x
Angular 2.0 Views
Angular 2.0 Views
Component lifecycle hooks in Angular 2.0
Component lifecycle hooks in Angular 2.0
Template syntax in Angular 2.0
Template syntax in Angular 2.0
Http Communication in Angular 2.0
Http Communication in Angular 2.0
Angular 2.0 Dependency injection
Angular 2.0 Dependency injection
Angular 2.0 Routing and Navigation
Angular 2.0 Routing and Navigation
Async & Parallel in JavaScript
Async & Parallel in JavaScript
Angular 2.0 Pipes
Angular 2.0 Pipes
Angular 2.0 forms
Angular 2.0 forms
Kürzlich hochgeladen
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
Delhi Call girls
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
Enterprise Knowledge
Evaluating the top large language models.pdf
Evaluating the top large language models.pdf
ChristopherTHyatt
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
Delhi Call girls
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
Delhi Call girls
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
Martijn de Jong
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
The Digital Insurer
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
sudhanshuwaghmare1
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
Principled Technologies
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
The Digital Insurer
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
Anna Loughnan Colquhoun
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
UK Journal
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
Enterprise Knowledge
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Miguel Araújo
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc
How to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
naman860154
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
wesley chun
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
The Digital Insurer
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
ThousandEyes
Kürzlich hochgeladen
(20)
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
Evaluating the top large language models.pdf
Evaluating the top large language models.pdf
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
How to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
SignalR
1.
SignalR Eyal
Vardi CEO E4D Solutions LTD Microsoft MVP Visual C# blog: www.eVardi.com
2.
Expert Days 2012
© 2010 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: Eyal@E4D.co.il
3.
Agenda
SignalR Server Side API SignalR JavaScript API SignalR Client .NET API SignalR Internals SignalR Extensibility © 2010 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: Eyal@E4D.co.il
4.
Sever Side © 2010
E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: Eyal@E4D.co.il
5.
What is SignalR?
SignalR is an asynchronous signaling library for ASP.NET, To help build real-time multi- user web application. SignalR is a complete client- and server-side solution with JS on client and ASP.NET on the back end to create these kinds of applications. © 2010 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: Eyal@E4D.co.il
6.
More Details on
SignalR SignalR is broken up into a few package on NuGet: SignalR - A meta package that brings in SignalR.Server and SignalR.Js (you should install this) SignalR.Server - Server side components needed to build SignalR endpoints SignalR.Js - Javascript client for SignalR SignalR.Client - .NET client for SignalR SignalR.Ninject - Ninject dependeny resolver for SignalR © 2010 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: Eyal@E4D.co.il
7.
Hub Class
Hubs provide a higher level RPC framework over a PersistentConnection. SignalR will handle the binding of complex objects and arrays of objects automatically. [HubName("Chat")] Callable from the client public class Chat : Hub { public string Send(string message) { return message; Deserialization } } © 2010 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: Eyal@E4D.co.il
8.
Hub API
Hubs are per call, that is, each call from the client to the hub will create a new hub instance. So don't setup static event handlers in hub methods. © 2010 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: Eyal@E4D.co.il
9.
Server Calling The
Client To call client event/methods from the server use the Clients property. Parameters passed to the method will be JSON serialized before being sent to the client [HubName("Chat")] public class Chat : Hub { public void Send(string message) { // Call the addMessage method on all clients Clients.addMessage(message); } } © 2010 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: Eyal@E4D.co.il
10.
Calling on Specific
Connections There are some cases where we want to send a message to specific clients or groups. We can use the indexer on the Clients object to specify a connection id. [HubName("Chat")] public class Chat : Hub { public void Send(string message) { Clients[Context.ConnectionId].addMessage(message); } } © 2010 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: Eyal@E4D.co.il
11.
Managing Groups
You can add connections to groups and send messages to particular groups. You may also return Task/Task<T> from a hub if you need to do async work. public class MyHub : Hub, IDisconnect { public Task Join() { return Groups.Add(Context.ConnectionId, "foo"); } public Task Send(string message) { return Clients["foo"].addMessage(message); } public Task Disconnect() { return Clients["foo"].leave(Context.ConnectionId); } } © 2010 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: Eyal@E4D.co.il
12.
State Between Client
& Server Any state sent from the client can be accessed via the Caller property. You can also set client side state just by setting any property on Caller. [HubName("Chat")] public class Chat : Hub { public void Send(string message) { // Access the id property set from the client. string id = Caller.id; // Set a property on the client state Caller.name = "SignalR"; } } © 2010 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: Eyal@E4D.co.il
13.
Client Events in
Server Side To detect disconnects when using hubs, implement the IDisconnect interface. To detect connects and reconnects, implement Iconnected. public class Status : Hub, IDisconnect, IConnected { public Task Disconnect() { return Clients.leave(Context.ConnectionId, DateTime.Now.ToString()); } public Task Connect() { return Clients.joined(Context.ConnectionId, DateTime.Now.ToString()); } public Task Reconnect(IEnumerable<string> groups) { return Clients.rejoined(Context.ConnectionId, DateTime.Now.ToString()); } } © 2010 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: Eyal@E4D.co.il
14.
Broadcasting From Outside
of a Hub Sometimes you have some arbitrary code in an application that you want to be able to notify all clients connected when some event occurs. public class Notifier { public static void Say(string message) { var context = GlobalHost.ConnectionManager.GetHubContext<MyHub>(); context.Clients.say(message); } } © 2010 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: Eyal@E4D.co.il
15.
Hub Routing
No need to specify a route for the hub as they are automatically accessible over a special url (/signalr) public class MvcApplication : System.Web.HttpApplication { protected void Application_Start() { RouteTable.Routes.MapHubs("~/signalr2"); } } © 2010 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: Eyal@E4D.co.il
16.
Client Side © 2010
E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: Eyal@E4D.co.il
17.
JavaScript Client
<script src="Scripts/jquery.signalR-0.5.3.min.js" type="text/javascript"></script> <script src="/signalr/hubs" type="text/javascript"></script> <script type="text/javascript"> $(function () { // Proxy created on the fly var chat = $.connection.chat; // Declare a function on the chat hub so the server can invoke it chat.addMessage = function (message) { $('#messages').append('<li>' + message + '</li>'); }; $("#broadcast").click(function () { // Call the chat method on the server chat.send($('#msg').val()); }); // Start the connection $.connection.hub.start(); }); </script> © 2010 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: Eyal@E4D.co.il
18.
JavaScript API
$.connection.hub The connection for all hubs (url points to /signalr). Returns a connection $.connection.hub.id The client id for the hub connection. $.connection.hub.logging Set to true to enable logging. Default is false $.connection.hub.start() Starts the connection for all hubs. © 2010 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: Eyal@E4D.co.il
19.
Exposing Methods For
The Server The JavaScript client can declare methods that the server can invoke. myHub.{method} = callback Method - name of the client side method. Callback - A function to execute when the server invokes the method. NOTE: if you misspell you will NOT get any warning or notifications even when logging is enabled. NOTE: Unlike the name change in myHub, the function names here at the same as you call in Server code. © 2010 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: Eyal@E4D.co.il
20.
Invoking methods on
the server The proxy will generate methods on each hub for the associated server methods. Returns jQuery deferred. NOTE: Method names will be camel cased similarly to hub names. myHub.someMethod() .done(function(result) {}) .fail(function(error) {}); © 2010 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: Eyal@E4D.co.il
21.
Round-Tripping State
To set state on the hub. Just assign values to properties on the hub object. myHub.name = “E4D” Whenever a call to the hub the state will be sent to the server. © 2010 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: Eyal@E4D.co.il
22.
Cross Domain Support
You can talk to SignalR servers either using websockets, cors enabled longpolling (not supported by all browsers) or jsonp longpolling. Cross domain urls are auto detected. We'll use xhr by default if the client (your browser) supports it. $.connection.hub.url = 'http://localhost:8081/signalr'; $.connection.hub.start(); © 2010 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: Eyal@E4D.co.il
23.
Cross Domain Support
(JSONP) Cross domain fall back to jsonp longpolling. To use jsonp longpolling, you can specify that option explicitly: $.connection.hub.url = 'http://localhost:8081/signalr'; $.connection.hub.start({ jsonp: true }); © 2010 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: Eyal@E4D.co.il
24.
$.connection.hub.logging = true;
var myHub = $.connection.myHub; myHub.someState = "SomeValue"; function connectionReady() { alert("Done calling first hub serverside-function"); }; myHub.SomeClientFunction = function () { alert("serverside called 'Clients.SomeClientFunction()'"); }; $.connection.hub.error(function () { alert("An error occured"); }); $.connection.hub.start() .done(function () { myHub.SomeFunction(SomeParam) //e.g. a login or init .done(connectionReady); }) .fail(function () { alert("Could not Connect!"); }); © 2010 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: Eyal@E4D.co.il
25.
Client JavaScript © 2010
E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: Eyal@E4D.co.il
26.
.Net Client
// Connect to the service var hubConnection = new HubConnection("http://localhost/mysite"); // Create a proxy to the chat service var chat = hubConnection.CreateProxy("chat"); // Print the message when it comes in chat.On("addMessage", message => Console.WriteLine(message)); // Start the connection hubConnection.Start().Wait(); string line = null; while ((line = Console.ReadLine()) != null) { // Send a message to the server chat.Invoke("Send", line).Wait(); } © 2010 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: Eyal@E4D.co.il
27.
SignalR Internals © 2010
E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: Eyal@E4D.co.il
28.
Default Start Point
The AspNetBootstrapper class initializes the Asp.Net hosting pipeline with HubDispatcher [assembly: PreApplicationStartMethod(typeof(AspNetBootstrapper), "Initialize")] namespace SignalR.Hosting.AspNet { public static class AspNetBootstrapper { ... // Initializes the ASP.NET host and sets up the default hub route (~/signalr). public static void Initialize() { Add Route ... RouteTable.Routes.MapHubs(); ... } private static void OnAppDomainShutdown() { ... } } } © 2010 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: Eyal@E4D.co.il
29.
MapHubs Extension Methods
The MapHubs does two things : Register the AspNetAssemblyLocator Build the route class for SignalR var locator = new Lazy<IAssemblyLocator>(() => new AspNetAssemblyLocator()); resolver.Register(typeof(IAssemblyLocator), () => locator.Value); var route = new Route(routeUrl, new HubDispatcherRouteHandler(url, resolver)); routeUrl = "~/signalr /{*operation}" © 2010 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: Eyal@E4D.co.il
30.
HubDispatcherRouteHandler
public IHttpHandler GetHttpHandler(RequestContext requestContext) { var dispatcher = new HubDispatcher(_url); return new AspNetHandler(_resolver, dispatcher); } © 2010 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: Eyal@E4D.co.il
31.
Persistent Connection © 2010
E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: Eyal@E4D.co.il
32.
HubDispatcher
public override Task ProcessRequestAsync(HostContext context) { // Generate the proxy if (context.Request.Url.LocalPath.EndsWith("/hubs",StringComparison.OrdinalIgnoreCase)) { context.Response.ContentType = "application/x-javascript"; return context.Response.EndAsync(_proxyGenerator.GenerateProxy(_url)); } ... return base.ProcessRequestAsync(context); } protected override Task OnReceivedAsync(IRequest req, string connId, string data) { ... // 1. Create the hub ... // 2. Resolve the method ... // 3. Resolving the state ... // 4. Invoke the method ... } © 2010 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: Eyal@E4D.co.il
33.
SignalR Extensibility © 2010
E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: Eyal@E4D.co.il
34.
Low Level Connection
You can add your own route RouteTable.Routes.MapConnection<MyConnection>("echo", "echo/{*operation}"); public class MyConnection : PersistentConnection { protected override Task OnReceivedAsync(string clientId, string data) { // Broadcast data to all clients return global::SignalR.Connection.Broadcast(data); } } © 2010 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: Eyal@E4D.co.il
35.
SignalR Extensibility
SignalR is built with dependency injection in mind. © 2010 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: Eyal@E4D.co.il
36.
Configuring SignalR
ConnectionTimeout The amount of time to leave a connection open before timing out. Default is 110 seconds. DisconnectTimeout The amount of time to wait after a connection goes away before raising the disconnect event. Default is 20 seconds. HeartBeatInterval The interval for checking the state of a connection. Default is 10 seconds. KeepAlive The amount of time to wait before sending a keep alive packet over an idle connection. Set to null to disable keep alive. This is set to 30 seconds by default. When this is on, the ConnectionTimeout will have no effect. © 2010 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: Eyal@E4D.co.il
37.
Replacing individual components
You can replace individual parts of SignalR without replacing the DependencyResolver by calling. GlobalHost .DependencyResolver .Register( typeof(IConnectionIdFactory), () => new CustomIdFactory() ); © 2010 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: Eyal@E4D.co.il
38.
Replaceable Components
The following lists the pluggable interfaces in SignalR. Interfaces Description IMessageBus Message bus. IConnectionIdGenerator Generates connection ids. IAssemblyLocator Locates assemblies to find hubs in. IJavaScriptProxyGenerator Generates the client proxy for hubs. IJavaScriptMinifier Allows the dynamic javascript proxy to be minified. IJsonSerializer Used to serialize and deserialze outgoing/incoming data. © 2010 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: Eyal@E4D.co.il
39.
Server Side © 2010
E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: Eyal@E4D.co.il
40.
Client Side © 2010
E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: Eyal@E4D.co.il