SwordRPC
SwordRPC copied to clipboard
Add a disconnect method
Currently one can only connect the socket. This is sufficient for programs that send RPC info about themselves.
However, there also exists the case where a program ∆ may provide RPC info for another program Ω. This may be done for a variety of reasons, including the original program not supporting Discord RPC.
∆ may run under a daemon-like paradigm, wherein it connects the RPC socket when Ω is run and disconnects it when Ω finishes/is killed. In this case, it is useful to have a disconnect method for the SwordRPC
class.
Alternatively, SwordRPC
's socket
could be made public and disconnected directly by ∆.