1.0.27 • Published 3 years ago

@aspnet/signalr v1.0.27

Weekly downloads
94,742
License
Apache-2.0
Repository
github
Last release
3 years ago

JavaScript and TypeScript clients for SignalR for ASP.NET Core

:warning: This package will no longer be supported starting August 21, 2021. This package follows the .NET Core 2.1 support lifecycle which is ending soon. Please transition to using @microsoft/signalr as described below.

Note: The JavaScript and TypeScript clients for SignalR for ASP.NET Core have been moved to @microsoft/signalr. If you are already using @aspnet/signalr and are unsure when to move to @microsoft/signalr, check the Feature Distribution chart in the ASP.NET Core SignalR documentation. Newer client releases are compatible with older version of ASP.NET Core SignalR which means it is safe to upgrade the client before upgrading the server.

Installation

npm install @aspnet/signalr

Usage

See the SignalR Documentation at docs.microsoft.com for documentation on the latest release.

Browser

To use the client in a browser, copy *.js files from the dist/browser folder to your script folder include on your page using the <script> tag.

Node.js

The following polyfills are required to use the client in Node.js applications:

  • XmlHttpRequest - always
  • WebSockets - to use the WebSockets transport
  • EventSource - to use the ServerSentEvents transport
  • btoa/atob - to use binary protocols (e.g. MessagePack) over text transports (ServerSentEvents)

Example (Browser)

let connection = new signalR.HubConnectionBuilder()
    .withUrl("/chat")
    .build();

connection.on("send", data => {
    console.log(data);
});

connection.start()
    .then(() => connection.invoke("send", "Hello"));

Example (NodeJS)

const signalR = require("@aspnet/signalr");

let connection = new signalR.HubConnectionBuilder()
    .withUrl("/chat")
    .build();

connection.on("send", data => {
    console.log(data);
});

connection.start()
    .then(() => connection.invoke("send", "Hello"));
haravan-react-componentsbrael-solarenginesbonee-shared-libtrack-biiot-libstongdai-bggb3-ol-mapabp-zero-templates-gabp-zero-template-gmanualabp-zero-templatabp-zero-templat-gabp-zero-template-gplex-ripper-web-ui@macrix/pct-sdkrelease-tracker-libpcs-notif-and-msgtelexpert-client-webrtctaicerhubbancxcamote@infinitebrahmanuniverse/nolb-_aspfoodstub_printer@everything-registry/sub-chunk-90glow-configuration@jannikb/react-gluevue-signalr-freshvue-simple-chatworkchattn-sharedtplus-postplus-mobile-scm-pagestplus-mobile-ditotem-timeline-signalrtimothy.cruztimothy.cruz638timothy.cruz639telemedicine-asp-signalrtelemedicine-signalair@fugu-fw/fugu-graphql-server-linkutil-vue-core-testvincent-chat-bobvincent-chatwindowvish-for-bytevish-for-sittervav1.1truedo-hazardzero@haravan/react-components@iti-core-widget/itiwidgetst-web-atom-libtaicertaicerhub2tenaur@hedou/core@growingdata/hyper-model-admin@growingdata/hyper-model-startofficearchitectproduction-webreact_bob_talkredux-observable-signalr-corereal-time-statussaukaccountancysaukaccountantssgrmhrznsignalr-web-clientsignalr-sharpskype-syncsprintteksprinttek-cardssprinttek-dev-templatessprinttek-dev-templates-cardssprinttek-dev-templates-redsprinttek-redsprinttek-templatessprinttek-templates-1sprinttek-templates-cadssprinttek-templates-cardingsprinttek-templates-cardssprinttek-templates-jursprinttek-templates-namsprinttek-templates-nambriasprinttek-templates-redsprinttek-templates-yowsprinttek-templates0cardssprinttek-templatesssprinttek-templatessxsprinttek-templatesx1sprinttektestsprinttektest1stoneinc@lytical/lspa@opuscapita/react-signalrxs2_node_sdk@ekomodititest2/angularbasetest1zckj_yxt@fathym/eac-state-kit@greinfall/widget3@manu72/iticoreconsum@barrachdtest/test-projectpcs-message-and-notificationpanorama-dashboard
1.0.27

3 years ago

1.0.26

3 years ago

1.1.4

5 years ago

1.1.2

5 years ago

1.1.0

5 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.0

6 years ago

1.0.0-rc1-final

6 years ago