Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public Send = async (aMsg: ButtplugMessage): Promise => {
if (!this.Connected) {
throw new ButtplugClientConnectorException("ButtplugClient not connected");
}
const p = this._sorter.PrepareOutgoingMessage(aMsg);
this.wsClient!.send("[" + aMsg.toJSON() + "]");
return await p;
}