Socket
Socket
Sign inDemoInstall

gitlab.com/diamondburned/drpc-server

Package Overview
Dependencies
9
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    gitlab.com/diamondburned/drpc-server

Package drpc is a small implementation of the Discord RPC server. The only supported commands are handshake and set activity. The general API structure could be put like so:


Version published

Readme

Source

drpc-server

My attempts at reverse-engineering the RPC server of the Discord client.

Motivation

I did not like the Electron client, but the idea of making an RPC serve-

Tested with

  • discord.nvim
  • VSCode

Running

This package has a cmd CLI. To run this, do

cd cmd/drpc-server/
go build # Run once
./drpc-server "$TOKEN"

Testing

The tests, if provided a $TOKEN environment variable, will try and connect to Discord and open a test RPC for as long as SIGINT is not triggered. Without the $TOKEN variable, the test would only do packet read tests and the socket test.

To fully test this with an external RPC application, the CLI provided in cmd should be used.

Contributing

When contributing, please include a spew.Dump of both the recv (received) packet and the send (sent) packet. This would aid massively in debugging and/or adding new features.

Known bugs

  • (*Handshake).Version could be either string or int, may need additional tweaks/workarounds.
  • SUBSCRIBE events don't do anything yet. I still yet have an idea of what this does.

FAQs

Last updated on 23 Jun 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc