This commit is contained in:
2016-09-28 13:01:36 +02:00
commit 59eedd6ec8
7 changed files with 90 additions and 0 deletions

2
test/index.ts Normal file
View File

@ -0,0 +1,2 @@
export * from './smartipc.classes.ipcserver'
export * from './smartipc.classes.ipcclient'

View File

@ -0,0 +1,7 @@
import * as plugins from './smartipc.plugins'
export calss IpcClient {
constructor() {
}
}

View File

@ -0,0 +1,44 @@
import * as plugins from './smartipc.plugins'
interface IIpcServeOptions {
appspace?: string
socketRoot?: string
id?: string
networkHost?: string //should resolve to 127.0.0.1 or ::1 see the table below related to this
networkPort?: number
encoding?: string
rawBuffer?: boolean
sync?: boolean
silent?: boolean
logInColor?: boolean
logDepth?: number
maxConnections?: number
retry?: number
maxRetries?: boolean
stopRetrying?: boolean
}
let defaultOptions: IIpcServeOptions = {
appspace: 'app.',
socketRoot: '/tmp/',
id: plugins.os.hostname(),
networkHost: 'localhost', //should resolve to 127.0.0.1 or ::1 see the table below related to this
networkPort: 8000,
encoding: 'utf8',
rawBuffer: false,
sync: false,
silent: false,
logInColor: true,
logDepth: 5,
maxConnections: 100,
retry: 500,
maxRetries: false,
stopRetrying: false
}
export class IpcServe {
ipcOptions: IIpcServeOptions
constructor(ipcOptionsArg: IIpcServeOptions) {
this.ipcOptions = plugins.lodash.merge({},defaultOptions,ipcOptionsArg)
}
}

5
test/smartipc.plugins.ts Normal file
View File

@ -0,0 +1,5 @@
import 'typings-global'
export import beautylog = require('beautylog')
export import lodash = require('lodash')
export let nodeIpc = require('node-ipc')
export import os = require('os')