Made hostname and port specifiable
This commit is contained in:
parent
e685e63c70
commit
914742051c
4
index.js
4
index.js
|
@ -7,7 +7,7 @@ const bsplit = require("buffer-split");
|
||||||
// Load the settings
|
// Load the settings
|
||||||
var settings = require("./settings.json");
|
var settings = require("./settings.json");
|
||||||
|
|
||||||
function connect()
|
function connect(hostname, port=22068)
|
||||||
{
|
{
|
||||||
// Make an accessible global object
|
// Make an accessible global object
|
||||||
var g = new Object();
|
var g = new Object();
|
||||||
|
@ -125,7 +125,7 @@ function connect()
|
||||||
|
|
||||||
|
|
||||||
// Connect to the server
|
// Connect to the server
|
||||||
client.connect(22068, '127.0.0.1', function()
|
client.connect(port, hostname, function()
|
||||||
{
|
{
|
||||||
// Create an rsa key
|
// Create an rsa key
|
||||||
g.rsa_key = new node_rsa({b:settings.rsa_size});
|
g.rsa_key = new node_rsa({b:settings.rsa_size});
|
||||||
|
|
Loading…
Reference in New Issue