RexSystem1 voteoriginally by @PhrolovaMoe on GitHub1 reply
Discord just opens a unix domain socket (or multiple, 0-9) at $XDG_RUNTIME_DIR, which apps that have RPC support hook into. each message is a header (opcode as uint32LE + length as uint32LE) followed by a JSON payload. on top of this, Discord on Linux periodically scans /proc for processes and matches them against a database for automatic matching
the opcodes are: 0 for handshake, 1 for frame (for setting activity, etc.), 2 for close, 3 for ping, and 4 for pong
for maximum compatibility, we probably want to mimic what Discord does with its unix sockets, but this would prevent you from using Fluxer and Discord at the same time
here's an example:
RexSystem1 voteoriginally by @PhrolovaMoe on GitHub
you can have 10 sockets at once, but apps hook into the first free socket. if an app hooks into Discord's socket first, we can't do anything about it. if the user disabled RPC in Discord though, it could work
Fluxer could have it's own sockets as well (fluxer-ipc-{0..9}), it's just that most apps won't implement RPC for Fluxer
Thread
Comment by @PhrolovaMoe
$XDG_RUNTIME_DIR, which apps that have RPC support hook into. each message is a header (opcode asuint32LE+ length asuint32LE) followed by a JSON payload. on top of this, Discord on Linux periodically scans/procfor processes and matches them against a database for automatic matching the opcodes are:0for handshake,1for frame (for setting activity, etc.),2for close,3for ping, and4for pong for maximum compatibility, we probably want to mimic what Discord does with its unix sockets, but this would prevent you from using Fluxer and Discord at the same time here's an example:Comment by @PhrolovaMoe
fluxer-ipc-{0..9}), it's just that most apps won't implement RPC for Fluxer