Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

botframework-streaming

Package Overview
Dependencies
Maintainers
3
Versions
510
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

botframework-streaming

Streaming library for the Microsoft Bot Framework

  • 4.23.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
122K
increased by2.76%
Maintainers
3
Weekly downloads
 
Created

What is botframework-streaming?

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.

What are botframework-streaming's main functionalities?

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!' });
});

Other packages similar to botframework-streaming

Keywords

FAQs

Package last updated on 23 Sep 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc