Made hostname and port specifiable

This commit is contained in:
jsrobson10 2019-03-30 21:37:02 +11:00
parent e685e63c70
commit 914742051c
1 changed files with 2 additions and 2 deletions

View File

@ -7,7 +7,7 @@ const bsplit = require("buffer-split");
// Load the settings
var settings = require("./settings.json");
function connect()
function connect(hostname, port=22068)
{
// Make an accessible global object
var g = new Object();
@ -125,7 +125,7 @@ function connect()
// Connect to the server
client.connect(22068, '127.0.0.1', function()
client.connect(port, hostname, function()
{
// Create an rsa key
g.rsa_key = new node_rsa({b:settings.rsa_size});