'use strict'; const os = require('os'), dns = require('dns'), util = require('util'), colors = require('colors'), eventParser = require('./lib/eventParser.js'), Client = require('./lib/client.js'), Server = require('./lib/socketServer.js'); colors.setTheme( { good : 'green', notice : 'yellow', warn : 'red', error : 'redBG', debug : 'magenta', variable: 'cyan', data : 'blue' } ); const IPType=os.networkInterfaces()[ Object.keys(os.networkInterfaces())[0] ][0].family; let defaults={ appspace : 'app.', socketRoot : '/tmp/', networkHost : (IPType=='IPv6')? '::1' : '127.0.0.1', networkPort : 8000, id : os.hostname(), encoding : 'utf8', rawBuffer : false, sync : false, silent : false, maxConnections : 100, retry : 500, maxRetries : Infinity, stopRetrying : false, IPType : IPType, tls : false }; let ipc = { config : defaults, connectTo : connect, connectToNet: connectNet, disconnect : disconnect, serve : serve, serveNet : serveNet, of : {}, server : false, log : log }; function log(){ if(ipc.config.silent){ return; } let args=Array.prototype.slice.call(arguments); for(let i=0, count=args.length; i