trepo-webworker-js
Starts a Trepo Server in a Web Worker.
Example
var worker = '/trepo-webworker.js'; worker { console; // Data will have 2 fields, id and payload.} // To start Trepoworker; // To make a requestworker; // To Stop Trepoworker;
Usage
Each request sends an id
, cmd
, and payload
. Each response includes an id
and a payload
.
Request
id
- Used to match requests with responses (each response will include the id of the request).cmd
- One ofstart
,stop
, andrequest
.payload
- The request payload.
Response
id
- Used to match requests with responses.payload
- The response payload.