Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LovenseCmd Support, Refactor Client API, Add IPC Support #449

Merged
merged 36 commits into from
Aug 13, 2018

Conversation

qdot
Copy link
Member

@qdot qdot commented Aug 5, 2018

No description provided.

qdot and others added 8 commits August 2, 2018 22:16
No protocol parsing currently, will just take any string. YOLO.
Leave liblog and WebSocketListener where they are, as they have major
version updates that will require more work later
- Move Client API to using Connectors instead of having WebSockets built
  in, allowing for different connection types.
- Remove JSON Serialization and message numbering from the base
  client class. These are only needed in connectors that run decoupled
  connections (network, ipc, etc), and those matters should be handled
  there. Functionality moved to helper objects that connectors can use.
- Sync paradigms to use async/await with exceptions instead of boolean
  returns
- Make events specific, don't require users to discern them from the
  returned arg types.
- Rewrite tests to be readable, compartmentalized, and updatable.

Fixes #368, #367, #366
Reimplement Websocket portions of ButtplugWSClient in their own
connector class.
@qdot qdot added applications DEPRECATED (repo is now library only) - Application related bugs library Issues that span all parts of the library (usually code style related) client Anything relating to clients, including connectors labels Aug 5, 2018
@qdot qdot self-assigned this Aug 5, 2018
@codecov
Copy link

codecov bot commented Aug 5, 2018

Codecov Report

❗ No coverage uploaded for pull request base (master@c5bc5b7). Click here to learn what that means.
The diff coverage is 81.77%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #449   +/-   ##
=========================================
  Coverage          ?   71.91%           
=========================================
  Files             ?      105           
  Lines             ?     5690           
  Branches          ?      450           
=========================================
  Hits              ?     4092           
  Misses            ?     1426           
  Partials          ?      172
Impacted Files Coverage Δ
...g.Components.Controls/ButtplugAboutControl.xaml.cs 6.25% <ø> (ø)
...anagers.UWPBluetoothManager/UWPBluetoothManager.cs 5.31% <ø> (ø)
...rver.Test/Bluetooth/Devices/KiirooGen2VibeTests.cs 100% <ø> (ø)
...tplug.Server/Bluetooth/BluetoothNotifyEventArgs.cs 0% <ø> (ø)
Buttplug.Core/Logging/ButtplugLogManager.cs 91.66% <ø> (ø)
Buttplug.Server.Test/ArgsTests.cs 100% <ø> (ø)
...uttplug.Server.Test/TestBluetoothSubtypeManager.cs 46.15% <ø> (ø)
Buttplug.Server.Test/AssemblyGitVersionTests.cs 100% <ø> (ø)
Buttplug.Apps.ServerGUI/MainWindow.xaml.cs 90.47% <ø> (ø)
...tplug.Server.Test/Bluetooth/Devices/KiirooTests.cs 100% <ø> (ø)
... and 83 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c5bc5b7...dbb8fe6. Read the comment docs.

The IPC Server can buffer multiple messages into the same string. We
need to be able to read them back out.
We shouldn't have to figure out whether we've pinged out by reading messages.
Don't listen on socket while other connections are live, just drop.
Make hard object/state lines between where server connections happen
and where session management with Buttplug Server lifetime happens.
… idiomatically async

WebsocketListener now comes with a client, meaning we can chuck the
mess that is Websocket4Net. Also start post-fixing "async" onto
functions that are async, and allowing them to take cancellation
tokens where possible.

This should also get rid of the "Not GET request" error on the
websocket, as that is no longer an error in WebsocketListener. We may
get some new error, but that should get a new bug to go with it.

Fixes #279, #283
Not sure anyone is using this anymore. If they are, we can always
bring it back up in another repo.

Fixes #448
This should be maintained outside the main codebase
Doesn't work with new Client API, and would rather just start from scratch.
Remove Kiiroo, add connectors
LibLog 5 has a breaking change that will take some extra work to bring in.
Just let Roslyn do a ton of automated warning fixes.
Any async call into ButtplugServer should be stoppable from the
outside using cancellation tokens. Expose token passing on the public
facing API, and thread them through to system calls (like UWP
bluetooth) as needed.

Fixes #454
ButtplugServer has internal test functions on it that can be on
TestServer with no real issues
We don't really need both targets, .Net Standard should be fine for
all of them.

Fixes #455
Now that Buttplug.Core is .Net Standard only, we can use LibLog 5.0.2.
This will still require stopping Stylecop until LibLog supports the
auto-generated tag header
Making some changes to our ruleset to make development suck
less (shouldn't error on multiple blank lines or comments without
spaces, etc), plus actually fixing some stuff.
Some tests in the server tests only exercised core. Make core its own
test project
Move the server frontends to similar naming as the client connectors.
As all the libraries we use for them are .Net Standard compatible,
change projects to using .Net Standard.

Fixes #451
Still has some bugs, but connects via playground and controls a Domi,
so that's a good start.
Due to the horribleness of having to keep bluetooth connections alive
across multiple server lifetimes, we need to be able to pass
DeviceManagers to new servers. I hate this.
@qdot qdot merged commit 419ff54 into master Aug 13, 2018
@qdot qdot deleted the line-ending-cleanup branch August 13, 2018 06:40
@qdot
Copy link
Member Author

qdot commented Aug 13, 2018

Build passed at https://ci.appveyor.com/project/qdot/buttplug-csharp/build/0.2.3.742 but Appveyor wasn't sending an update ping?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
applications DEPRECATED (repo is now library only) - Application related bugs client Anything relating to clients, including connectors library Issues that span all parts of the library (usually code style related)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants