update docs & readme
This commit is contained in:
parent
10074e197f
commit
8ae1307a17
3 changed files with 17 additions and 13 deletions
12
README.md
12
README.md
|
|
@ -5,17 +5,15 @@ API Docs [here](https://riksolo.pages.riksolo.com/ts-osc/)
|
|||
|
||||
## Usage example
|
||||
```javascript
|
||||
import {OSCClient, OSCType} from 'ts-osc';
|
||||
import {OSCClient, OSCType, OSCServer} from 'ts-osc';
|
||||
|
||||
const client = new OSCClient({
|
||||
outHost: "localhost",
|
||||
outPort: 8000,
|
||||
inPort: 8000
|
||||
})
|
||||
const client = new OSCClient("localhost", 8000);
|
||||
|
||||
client.send('/hello', OSCType.String, "hello");
|
||||
|
||||
client.on('message', (msg)=>{
|
||||
const server = new OSCServer("0.0.0.0", 8000);
|
||||
|
||||
server.on('message', (msg)=>{
|
||||
console.log(msg);
|
||||
})
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue