![pnpm 9.5 Introduces Catalogs: Shareable Dependency Version Specifiers](https://cdn.sanity.io/images/cgdhsj6q/production/c06a5b74512bcc6da29d38cef96a454fa947810d-1024x1024.webp?w=400&fit=max&auto=format)
Security News
pnpm 9.5 Introduces Catalogs: Shareable Dependency Version Specifiers
pnpm 9.5 introduces a Catalogs feature, enabling shareable dependency version specifiers, reducing merge conflicts and improving support for monorepos.
botframework-streaming
Advanced tools
Package description
The botframework-streaming npm package is part of the Microsoft Bot Framework and provides functionality for streaming data between bots and channels. It allows for efficient, real-time communication by enabling bots to send and receive data streams, which is particularly useful for scenarios involving large payloads or continuous data transfer.
Streaming Connections
This feature allows you to create a named pipe server that can accept streaming connections. The code sample demonstrates how to set up a named pipe server and handle incoming connections and messages.
const { NamedPipeServer } = require('botframework-streaming');
const server = new NamedPipeServer('mypipe');
server.start();
server.on('connection', (connection) => {
console.log('New connection established');
connection.on('message', (message) => {
console.log('Received message:', message);
});
});
WebSocket Connections
This feature allows you to create a WebSocket server for streaming data. The code sample demonstrates how to set up a WebSocket server, start it, and handle incoming connections and messages.
const { WebSocketServer } = require('botframework-streaming');
const server = new WebSocketServer({ port: 8080 });
server.start();
server.on('connection', (connection) => {
console.log('New WebSocket connection established');
connection.on('message', (message) => {
console.log('Received message:', message);
});
});
Streaming Data
This feature allows you to stream data to a server. The code sample demonstrates how to create a named pipe client, connect to a server, and send a message.
const { NamedPipeClient } = require('botframework-streaming');
const client = new NamedPipeClient('mypipe');
client.connect().then(() => {
console.log('Connected to server');
client.send({ type: 'message', text: 'Hello, server!' });
});
The ws package is a simple to use, blazing fast, and thoroughly tested WebSocket client and server for Node.js. It provides similar WebSocket server and client functionalities as botframework-streaming but does not include named pipe support.
Socket.IO is a library that enables real-time, bidirectional, and event-based communication between web clients and servers. It offers more features than botframework-streaming, such as automatic reconnection, rooms, and namespaces, but is primarily focused on WebSocket communication.
The websocket package provides a WebSocket server and client for Node.js. It supports both WebSocket and WebSocket Secure (WSS) protocols. While it offers similar WebSocket functionalities, it does not support named pipes like botframework-streaming.
Readme
This library contains the core of Bot Framework Streaming Extensions, which extends the 3.0 Bot Framework protocol to communicate over multiplexed, persistent, connections such as named pipes or WebSocket.
To add the latest published version of this package to your bot:
npm install --save botframework-streaming
To get access to the daily builds of this library, configure npm to use the MyGet feed before installing.
npm config set registry https://botbuilder.myget.org/F/botbuilder-v4-js-daily/npm/
To reset the registry in order to get the latest published version, run:
npm config set registry https://registry.npmjs.org/
FAQs
Unknown package
We found that botframework-streaming demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
pnpm 9.5 introduces a Catalogs feature, enabling shareable dependency version specifiers, reducing merge conflicts and improving support for monorepos.
Security News
A threat actor on BreachForums is selling an unverified npm vulnerability for account takeover, but npm has not officially confirmed the existence of this security concern.
Security News
Cyber insurance rates are dropping as the market matures, according to a new report projecting global premiums to reach $43 billion by 2030, driven by international market uptake and growth in the SME sector.