New: Introducing PHP and Composer Support.Read the Announcement
Socket
Book a DemoInstallSign in
Socket

@needle-tools/networking

Package Overview
Dependencies
Maintainers
0
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@needle-tools/networking

Networking backend functionality for Needle Engine

latest
Source
npmnpm
Version
2.2.1
Version published
Maintainers
0
Created
Source

This is the networking package for Needle Engine

Integrate with fastify:

import networking from "@needle-tools/needle-tiny-networking-ws";
networking.startServerFastify(fastifyApp, { endpoint: "/socket" });

Integrate with express:

import networking from "@needle-tools/needle-tiny-networking-ws";
networking.startServerExpress(expressApp, { endpoint: "/socket" });

Options

  • endpoint : string - optional relative server endpoint (e.g. /socket to start the websocket endpoint on yourserver/socket). If not provided will fallback to /
  • maxUsers: number - max concurrent users on a server

Storage

The networking state can be saved to S3 compatible storage providers.
Use the following environment variables to enable S3 storage:

NEEDLE_NETWORKING_S3_ENDPOINT=
NEEDLE_NETWORKING_S3_REGION=
NEEDLE_NETWORKING_S3_BUCKET=
NEEDLE_NETWORKING_S3_ACCESS_KEY_ID=
NEEDLE_NETWORKING_S3_ACCESS_KEY=
NEEDLE_NETWORKING_S3_PREFIX= # all state saved in the bucket will be prefixed with this string. This can be a path e.g. `my_state/` or a unique id `server_123_`

Contact

needle — tools for unity@NeedleTools@marcel_wiessler@hybridherbst

Keywords

needle

FAQs

Package last updated on 16 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