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
|
||||
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});
|
||||
|
|
Loading…
Reference in New Issue