Constructor Summary
Public Constructor | ||
public |
constructor(options: object) Create an OSC WebsocketServerPlugin instance with given options. |
Member Summary
Private Members | ||
private |
|
|
private |
|
|
private |
|
|
private |
|
Method Summary
Public Methods | ||
public |
close() Close Websocket server |
|
public |
Start a Websocket server. |
|
public |
send(binary: Uint8Array) Send an OSC Packet, Bundle or Message to Websocket clients |
|
public |
Returns the current status of the connection |
Private Methods | ||
private |
registerNotify(fn: function) Internal method to hook into osc library's EventHandler notify method |
Inherited Summary
From class Plugin | ||
public |
close() Close socket connection and anything else used in the implementation. |
|
public |
Open socket connection. |
|
public |
send(binary: Uint8Array, customOptions: object) Send an OSC Packet, Bundle or Message. |
|
public |
Returns the current status of the connection |
Public Constructors
public constructor(options: object) source
Create an OSC WebsocketServerPlugin instance with given options. Defaults to localhost:8080 for the Websocket server
Override:
Plugin#constructorExample:
const plugin = new OSC.WebsocketServerPlugin({ port: 9912 })
const osc = new OSC({ plugin: plugin })
osc.open() // start server
const http = require('http')
const httpServer = http.createServer();
const plugin = new OSC.WebsocketServerPlugin({ server: httpServer })
const osc = new OSC({ plugin: plugin })
Private Members
Public Methods
public open(customOptions: object) source
Start a Websocket server. Defaults to global options
Override:
Plugin#openpublic send(binary: Uint8Array) source
Send an OSC Packet, Bundle or Message to Websocket clients
Override:
Plugin#sendParams:
Name | Type | Attribute | Description |
binary | Uint8Array | Binary representation of OSC Packet |