مشخصات کتاب
-
José M. Aguilar
-
2014
-
انگلیسی
-
23498
-
879
-
0
SignalR Programming in Microsoft ASP.NET
Chapter 1 Internet, asynchrony, multiuser…wow! 1
Chapter 2 HTTP: You are the client, and you are the boss 5
HTTP operations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Polling: The answer?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Push: The server takes the initiative. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
WebSockets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Server-Sent Events (API Event Source). . . . . . . . . . . . . . . . . . . . . . . . . 11
Push today. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
The world needs more than just push. . . . . . . . . . . . . . . . . . . . . . . . . 15
Chapter 3 Introducing SignalR 17
What does SignalR offer? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Two levels of abstraction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Supported platforms. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
OWIN and Katana: The new kids on the block. . . . . . . . . . . . . . . . . . . . . . . 21
Installing SignalR. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Chapter 4 Persistent connections 27
Implementation on the server side. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Mapping and configuring persistent connections. . . . . . . . . . . . . . . 28
Events of a persistent connection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
viii Contents
Sending messages to clients . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Asynchronous event processing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Connection groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
The OWIN startup class. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Implementation on the client side. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Initiating the connection by using the JavaScript client. . . . . . . . . . 38
Support for older browsers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Support for cross-domain connections. . . . . . . . . . . . . . . . . . . . . . . . 41
Sending messages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Receiving messages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Sending additional information to the server. . . . . . . . . . . . . . . . . . . 46
Other events available at the client . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Transport negotiation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Adjusting SignalR configuration parameters. . . . . . . . . . . . . . . . . . . . . . . . . 50
Complete example: Tracking visitors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Project creation and setup. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Implementation on the client side. . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Implementation on the server side. . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Chapter 5 Hubs 57
Server implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Hub registration and configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Creating hubs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Receiving messages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Sending messages to clients . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Sending messages to specific users. . . . . . . . . . . . . . . . . . . . . . . . . . . 68
State maintenance. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Accessing information about the request context. . . . . . . . . . . . . . . 71
Notification of connections and disconnections. . . . . . . . . . . . . . . . 72
Managing groups. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Maintaining state at the server. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Client implementation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
کتاب آموزش ASP.NET 3.5 در C # 2008از تازه کار تا حرفه ایC # 2008
نویسنده: Matthew MacDonald
زبان: انگلیسی
کتاب آموزش Web Development، سیلورلایت و ASP.NET AJAX از تازه کار تا حرفه ای
نویسنده: Laurence Moroney
زبان: انگلیسی