Skip to content

tigercat2000/http2byond

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

http2byond

A communication layer between node.js and BYOND game servers.

Installation

npm install --save http2byond

Example

const {createTopicConnection} = require("./index.js");
let connection = createTopicConnection({
  host: "localhost",
  port: 6666
})

connection.send("status").then((body) => {
  console.log(body);
}, (err) => {
  console.error("ERR", err);
});

async function anAsyncFunction() {
  const result = connection.send("status");
}

OR

const {sendTopic} = require("./index.js");

sendTopic({
  host: "localhost",
  port: 6666,
  topic: "status"
}).then((body) => {
  console.log(body);
}, (err) => {
  console.error("ERR", err);
});

async function anAsyncFunction() {
  const result = await sendTopic({
    host: "localhost",
    port: 6666,
    topic: "status"
  });
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •