Home Reference Source
public class | source

ProcessWorker

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public
public get
public

emitter: *

public

id: *

public
public

suffix: *

Private Members
private

_child: *

private

_count: *

private

_data: *

private

_end: *

private
private
private
private
private
private
private
private
private
private

Method Summary

Public Methods
public

kill(param: *): *

public

on(a: *, b: *): *

public

once(a: *, b: *): *

public
public

async send(length: *, block: *, difficulty: *, start: *, end: *, batch: *)

public

async start(path: *, filename: *): boolean

Private Methods
private

async _deleteFile(prefix: string)

private

_emit(a: *, b: *): *

private
private

async _validateWork()

private

async _writeWork(data: *)

Public Constructors

public constructor() source

Public Members

public allowSendBeforeReadPreviously: * source

public get connected: boolean source

public emitter: * source

public id: * source

public noncesWorkBatch: * source

public suffix: * source

Private Members

private _child: * source

private _count: * source

private _data: * source

private _end: * source

private _is_batching: boolean source

private _lastData: * source

private _nextData: * source

private _outputFilename: string source

private _path: string source

private _prevHash: string source

private _sendDataTimeout: * source

private _start: number source

private _timeStart: * source

private _timeoutValidation: * source

Public Methods

public kill(param: *): * source

Params:

NameTypeAttributeDescription
param *

Return:

*

public on(a: *, b: *): * source

Params:

NameTypeAttributeDescription
a *
b *

Return:

*

public once(a: *, b: *): * source

Params:

NameTypeAttributeDescription
a *
b *

Return:

*

public restartWorker() source

public async send(length: *, block: *, difficulty: *, start: *, end: *, batch: *) source

Params:

NameTypeAttributeDescription
length *
block *
difficulty *
start *
end *
batch *

public async start(path: *, filename: *): boolean source

Params:

NameTypeAttributeDescription
path *
filename *

Return:

boolean

Private Methods

private async _deleteFile(prefix: string) source

Params:

NameTypeAttributeDescription
prefix string
  • optional
  • default:

private _emit(a: *, b: *): * source

Params:

NameTypeAttributeDescription
a *
b *

Return:

*

private _getProcessParams(): * source

Return:

*

private async _validateWork() source

private async _writeWork(data: *) source

Params:

NameTypeAttributeDescription
data *