dotnet-maestro[bot] 2ceca7fb89 [master] Update dependencies from dotnet/efcore dotnet/runtime (#27845) 5 лет назад
..
clients 2ceca7fb89 [master] Update dependencies from dotnet/efcore dotnet/runtime (#27845) 5 лет назад
common 2ceca7fb89 [master] Update dependencies from dotnet/efcore dotnet/runtime (#27845) 5 лет назад
docs 646de19f1d Update HubProtocol.md (#23389) 5 лет назад
perf 85bde1da5e Parallel hub invocations (#23535) 5 лет назад
samples f83817e183 Use new RNG.GetBytes() function (#27792) 5 лет назад
server 7ce071b271 Switching from RuntimeInformation.IsOSPlatform(XYZ) to OperatingSystem.IsXYZ() (#28233) 5 лет назад
.vsconfig f34033a415 Add .vsconfig files in root and beside slns 6 лет назад
Directory.Build.props 3beea3035b Enable API doc checks by default (#27515) 5 лет назад
Directory.Build.targets 85ae18c723 Make Visual Studio 2019 a prerequisite to building this repo (#7005) 7 лет назад
README.md 4ae2bf2c03 Add README for Hosting (#27925) 5 лет назад
SignalR.slnf 3117f43c33 Migrate to single sln file + slnf files (#23581) 5 лет назад
THIRD-PARTY-NOTICES 1992701808 Reorganize source code in preparation to move into aspnet/AspNetCore 7 лет назад
build.cmd f26b87aa42 Check for Java in local SignalR build (#10455) 6 лет назад
build.sh 3cd5054eb5 Merge branch 'release/2.2' 7 лет назад
publish-apps.ps1 219ecd6880 [master] Update dependencies from dotnet/runtime dotnet/efcore (#26788) 5 лет назад
splat-browser-logs.ps1 3cd5054eb5 Merge branch 'release/2.2' 7 лет назад
startvs.cmd 3117f43c33 Migrate to single sln file + slnf files (#23581) 5 лет назад
xunit.runner.json f5a2245957 Use xunit.runner.json in Helix runs (#19922) 6 лет назад

README.md

ASP.NET Core SignalR

ASP.NET Core SignalR is a library for ASP.NET Core developers that makes it incredibly simple to add real-time web functionality to your applications. What is "real-time web" functionality? It's the ability to have your server-side code push content to the connected clients as it happens, in real-time.

You can watch an introductory presentation here - ASP.NET Core SignalR: Build 2018

Documentation for ASP.NET Core SignalR can be found in the Real-time Apps section of the ASP.NET Core Documentation site.

Description

This folder contains the server and client implementations for SignalR.

The following contains a description of the sub-directories.

  • server/Core: Contains the main server-side implementation of the SignalR protocol and the Hubs API.
  • server/SignalR: Contains extensions that help make using SignalR easier.
  • server/StackExchangeRedis: Contains a backplane implementation using StackExchange.Redis.
  • server/Specification.Tests: Contains a set of tests for users to use when verifying custom implementations of SignalR types.
  • common/Http.Connections.Common: Contains common types used by both the server and .NET client for the HTTP layer.
  • common/Http.Connections: Contains the HTTP implementation layer for LongPolling, ServerSentEvents, and WebSockets on the server.
  • common/Protocols.Json: Contains the Json Hub Protocol implementation using System.Text.Json for the server and .NET client.
  • common/Protocols.MessagePack: Contains the MessagePack Hub Protocol implementation for the server and .NET client.
  • common/Protocols.NewtonsoftJson: Contains the Json Hub Protocol implementation using Newtonsoft.Json for the server and .NET client.
  • common/SignalR.Common: Contains common types used by both the server and .NET client for the SignalR layer.
  • clients/csharp: Contains the client-side implementation of the SignalR protocol in .NET.
  • clients/java: Contains the client-side implementation of the SignalR protocol in Java.
  • clients/ts: Contains the client-side implementation of the SignalR protocol in TypeScript/JavaScript.

Development Setup

Build

By default, the build script will try to build Java and Typescript projects. If you don't want to include those, you can pass "-NoBuildJava" and "-NoBuildNodeJS" respectively to the build script to skip them. Or "--no-build-java" and "--no-build-nodejs" on MacOS or Linux.

To build this specific project from source, you can follow the instructions on building a subset of the code.

Or for the less detailed explanation, run the following command inside this directory.

> ./build.cmd

Or on MacOS or Linux:

$ ./build.sh

Test

This project's tests require having "java" and "npm" on your path.

To run the tests for this project, you can run the tests on the command line in this directory.

Or for the less detailed explanation, run the following command inside this directory.

> ./build.cmd -t

Or on MacOS or Linux:

$ ./build.sh -t

You can also run project specific tests by running dotnet test in the tests directory next to the src directory of the project.

To run Java tests go to the clients/java/signalr folder and run gradle test.

To run TypeScript unit tests go to the clients/ts folder and run npm run test. To run TypeScript EndToEnd tests go to the clients/ts/FunctionalTests folder and run npm run test:inner.

More Information

For more information, see the ASP.NET Core README.