From 31002cd9cb64c33a800a5a3e7e300861660d7fc2 Mon Sep 17 00:00:00 2001 From: blackspherefollower Date: Tue, 3 Sep 2024 12:21:47 +0100 Subject: [PATCH] doc: Improving the readme --- LICENSE | 2 +- README.md | 63 +++++++++++++++++++++++++++++++++---------------------- 2 files changed, 39 insertions(+), 26 deletions(-) diff --git a/LICENSE b/LICENSE index 0efeefd..7aa3021 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ Buttplug for Java is covered under the following BSD 3-Clause License -Copyright (c) 2017, BlackSphereFollower +Copyright (c) 2024, BlackSphereFollower All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/README.md b/README.md index 7719807..72eeff0 100644 --- a/README.md +++ b/README.md @@ -1,36 +1,49 @@ -# Buttplug - Java WebSocket Client Implementation +# Buttplug for Java - A Buttplug Client Implementation for Native Java [![Build Status](https://github.com/blackspherefollower/buttplug4j/actions/workflows/gradle.yml/badge.svg?branch=master)](https://github.com/blackspherefollower/buttplug4j/actions/workflows/gradle.yml) [![Patreon donate button](https://img.shields.io/badge/patreon-donate-yellow.svg)](https://www.patreon.com/blackspherefollower) -Buttplug is a framework for hooking up hardware to interfaces, where -hardware usually means sex toys, but could honestly be just about -anything. It's basically a userland HID manager for things that may -not specifically be HID. +Learn more about buttplug.io at https://buttplug.io -In more concrete terms, think of Buttplug as something like -[osculator](http://www.osculator.net/) or [VRPN](http://vrpn.org), but -for sex toys. Instead of wiimotes and control surfaces, we interface -with vibrators, electrostim equipment, fucking machines, and other -hardware that can communicate with computers. - -The core of buttplug works as a router. It is an application that -connects to driver libraries, to register and communicate with -different hardware. Clients can then connect over different means -(network, websockets, etc...), to interact with the hardware. - -## Other Buttplug Implementations - -Buttplug implementations are available in multiple languages (c#, rust, -javascript, etc)/frameworks/platforms. For a full -list, -[see the README in the main buttplug repo](http://github.com/buttplugio/buttplug). ## Platform Support Buttplug Java should run on any 1.8 or later JRE (including Android). In depth testing is still pending, so your mileage may vary. -## Development +## Usage + +The core buttplug4j library does not contain a transport implementation, +as the connector layer is intended to be extensible. In reality, you'll probably just +want the Jetty websocket client connector (this depends on the core client +library, so there's no need to add a separate dependency); see the 2 +dependency import examples below. + +For Gradle: +```groovy +dependencies { + implementation 'io.github.blackspherefollower:buttplug4j.connectors.jetty.websocket.client:3.1.105' +} +``` + +For Maven: +```xml + + + io.github.blackspherefollower + buttplug4j.connectors.jetty.websocket.client + 3.1.105 + + +``` + +For an all-in-one example project, please see https://github.com/blackspherefollower/buttplug4j-example + +In general, you'll want to create a `ButtplugClientWSClient` object in a scope where it will not get garbage collected +before you're done, add callbacks for error and event handling, then connect it to the address Intiface is listening +on. Then you can scan for devices, iterate over them and send commands. + + +### Snapshots Snapshot libraries from the buttplug4j repo are available via Maven from the following repository: https://s01.oss.sonatype.org/content/repositories/snapshots @@ -49,7 +62,7 @@ Releases will be available from maven central. io.github.blackspherefollower - buttplug4j + buttplug4j.connectors.jetty.websocket.client [3.0-SNAPSHOT,) @@ -66,7 +79,7 @@ write code for! Buttplug for Java is BSD licensed. - Copyright (c) 2016-2017, BlackSphereFollower + Copyright (c) 2016-2024, BlackSphereFollower All rights reserved. Redistribution and use in source and binary forms, with or without