buttplugio / buttplug-js

Buttplug Typescript/Javascript Client Implementation
https://buttplug.io
BSD 3-Clause "New" or "Revised" License
128 stars 18 forks source link

Remove ServerMessageHub and replace with closure passing #144

Closed qdot closed 5 years ago

qdot commented 5 years ago

ServerMessageHub was made so I didn't have to worry about how to get messages from DeviceManager up to ButtplugServer. However, this now means we lose all possible errors thrown, which is bad. Have ButtplugServer pass a closure to DeviceManager so it can pass messages up and out of the system as needed.