npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

scoring-gateway-receiver

v0.0.2

Published

the receiver only

Downloads

8

Readme

SCORING GATEWAY

Installation

  1. Download the package from NPM
npm i @emg-digital/scoring-gateway
  1. Add the package to your project
const { Sender, Receiver } = require('@emg-digital/');

Use

SENDER

The sender is compatible with several data inputs. It can receive data in UDP, COM PORT and socket.io (Streamdeck) Therefore to launch the sender you must provide a certain number of parameters depending on the method you want to use.

  1. SENDER (UDP)

network OBJECT Mandatory

method STRING Mandatory, address STRING Mandatory, UDPport INT Mandatory

provider STRING Mandatory

receiverOnlineURL STRING Optional

operationName STRING Optional

let network = {
    method: "UDP",
    address: "127.0.0.1",
    UDPport: 1940,
};
let provider = "tangodelta-handball";

Sender.start(network,provider);
  1. SENDER (COM PORT)

network OBJECT Mandatory

method STRING Mandatory, comName STRING Mandatory

provider STRING Mandatory

receiverOnlineURL STRING Optional

operationName STRING Optional

let network = {
    method: "COM",
    comName: "COM4"
};
let provider = "Bodet";//Bodet or SwissTiming or Handvision

Sender.start(network,provider);
  1. SENDER (SOCKET)

network OBJECT Mandatory

method STRING Mandatory, socketPort INT Mandatory

provider STRING Mandatory

receiverOnlineURL STRING Optional

operationName STRING Optional

let network = {
    method: "Socket",
    socketPort: 8585
};
let provider = "StreamDeck";

Sender.start(network,provider);
  1. STOP SENDER
Sender.stop();

RECEIVER

The receiver provides an HTTP and WebSocket API with socket.io. The module launches on the port that you specify at startup. However if the port is not available the application will take care of finding a free one before returning it to you.

  1. START RECEIVER

port INT Mandatory

let port = 8090;

Receiver.start(port).then(res => {
    console.log(res)//Log the port on which the application is started. INT
}).catch(error => {
    console.log(error)// Log error. STRING
});
  1. STOP RECEIVER
Receiver.stop().then(res => {
    console.log(res)//Log success. STRING
});

INTERNAL RECEIVER API

The receiver can be used as a simple module if it is used locally. Therefore the module provides an internal API which allows you to retrieve the list of matches and listen to a match.

  1. GET MATCH LIST
let list = Receiver.getMatchList();
  1. SUBSCRIBE AND LISTEN A MATCH
// Get Match id from a match from the match list
Receiver.subsribeMatch(MatchId);

Receiver.receiverEmitter.on('subscribed-match',data => {
    console.log(data);
});