Files
sexy/packages/buttplug/src/client/ButtplugBrowserWebsocketClientConnector.ts

26 lines
836 B
TypeScript
Raw Normal View History

2025-10-25 22:04:41 +02:00
/*!
* Buttplug JS Source Code File - Visit https://buttplug.io for more info about
* the project. Licensed under the BSD 3-Clause license. See LICENSE file in the
* project root for full license information.
*
* @copyright Copyright (c) Nonpolynomial Labs LLC. All rights reserved.
*/
"use strict";
2025-10-25 22:04:41 +02:00
import { IButtplugClientConnector } from "./IButtplugClientConnector";
import { ButtplugMessage } from "../core/Messages";
import { ButtplugBrowserWebsocketConnector } from "../utils/ButtplugBrowserWebsocketConnector";
2025-10-25 22:04:41 +02:00
export class ButtplugBrowserWebsocketClientConnector
extends ButtplugBrowserWebsocketConnector
implements IButtplugClientConnector
2025-10-25 22:04:41 +02:00
{
public send = (msg: ButtplugMessage): void => {
if (!this.Connected) {
throw new Error("ButtplugClient not connected");
}
this.sendMessage(msg);
};
2025-10-25 22:04:41 +02:00
}