diff --git a/README.md b/README.md index f32d044..8a58054 100644 --- a/README.md +++ b/README.md @@ -64,3 +64,13 @@ const port = await connection.getInnerPort(); // ... transfer it to worker ... const client = new BareClient(port); ``` +```js +// doing this synchronously +const connection = new Ultraviolet.BareMuxConnection(); +let port; +connection.getInnerPort().then((MessagePort) => { + port = MessagePort; +}); +// ... transfer it to worker ... +this.bareClient = new BareClient(port) +``` \ No newline at end of file