start-javascript / ngx-web-worker

Web worker for angular.
33 stars 7 forks source link

How to use this web worker to receive websocket and send? #5

Open Jamlearner opened 5 years ago

Jamlearner commented 5 years ago

I see that it returns a promise of the function,

        const promise = this._webWorkerService.run(this.someCPUHeavyFunction, input);
        promise.then(result => console.log(result));

How can I use a worker to receive a websocket and send the received information back?