
Security News
AI Agent Lands PRs in Major OSS Projects, Targets Maintainers via Cold Outreach
An AI agent is merging PRs into major OSS projects and cold-emailing maintainers to drum up more work.
@microsoft/signalr
Advanced tools
JavaScript and TypeScript clients for SignalR for ASP.NET Core and Azure SignalR Service
npm install @microsoft/signalr
# or
yarn add @microsoft/signalr
To try previews of the next version, use the next tag on NPM:
npm install @microsoft/signalr@next
# or
yarn add @microsoft/signalr@next
See the SignalR Documentation at learn.microsoft.com for documentation on the latest release. API Reference Documentation is also available on learn.microsoft.com.
For documentation on using this client with Azure SignalR Service and Azure Functions, see the SignalR Service serverless developer guide.
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.
To use the client in a webworker, copy *.js files from the dist/webworker folder to your script folder include on your webworker using the importScripts function. Note that webworker SignalR hub connection supports only absolute path to a SignalR hub.
To use the client in a NodeJS application, install the package to your node_modules folder and use require('@microsoft/signalr') to load the module. The object returned by require('@microsoft/signalr') has the same members as the global signalR object (when used in a browser).
let connection = new signalR.HubConnectionBuilder()
.withUrl("/chat")
.build();
connection.on("send", data => {
console.log(data);
});
connection.start()
.then(() => connection.invoke("send", "Hello"));
importScripts('signalr.js');
let connection = new signalR.HubConnectionBuilder()
.withUrl("https://example.com/signalr/chat")
.build();
connection.on("send", data => {
console.log(data);
});
connection.start()
.then(() => connection.invoke("send", "Hello"));
const signalR = require("@microsoft/signalr");
let connection = new signalR.HubConnectionBuilder()
.withUrl("/chat")
.build();
connection.on("send", data => {
console.log(data);
});
connection.start()
.then(() => connection.invoke("send", "Hello"));
Socket.IO is a popular library for real-time web applications. It enables real-time, bidirectional and event-based communication. It works on every platform, browser, or device, focusing equally on reliability and speed. Compared to @microsoft/signalr, Socket.IO is more widely used and has a larger community, but it may require more setup and configuration.
Primus is a flexible and extensible library for real-time communication. It abstracts away the different real-time frameworks and provides a unified API. Primus can work with various real-time engines like WebSockets, Engine.IO, and SockJS. It offers more flexibility compared to @microsoft/signalr but might be more complex to set up.
Faye is a simple publish-subscribe messaging system based on the Bayeux protocol. It is designed for low-latency, high-throughput messaging between web clients. Faye is simpler and more lightweight compared to @microsoft/signalr, but it may not offer as many features out of the box.
FAQs
ASP.NET Core SignalR Client
The npm package @microsoft/signalr receives a total of 1,037,473 weekly downloads. As such, @microsoft/signalr popularity was classified as popular.
We found that @microsoft/signalr demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
An AI agent is merging PRs into major OSS projects and cold-emailing maintainers to drum up more work.

Research
/Security News
Chrome extension CL Suite by @CLMasters neutralizes 2FA for Facebook and Meta Business accounts while exfiltrating Business Manager contact and analytics data.

Security News
After Matplotlib rejected an AI-written PR, the agent fired back with a blog post, igniting debate over AI contributions and maintainer burden.