feat: IPC Server, Controller For Swarm Control [WIP] #953
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
An effort to better expose bots' functionality for headless & programmatic control.
User is able to create named pipes with the name they specify and the bot can listen to that pipe. Allowing seperation for multiple swarms. Features are to be tested. Need better aliases for the options (gave a random one for each, to be made semantic™️)
All communication is made via JSON.
Example command line interface functionality exposed via this PR:
RSBot
IPC Server to Listen to
RSBotIPCpipe is default in Server and Controller, however the user explicitly needs to specify the server to be listened.RSBot.exe -p profile -l RSBotIPCAutologin
Creating a New Autologin
RSBot.exe -p profile -e(--create-autologin) --username username --password passwordRSBot.exe -p profile -e --username username --password password --secondary-password --provider-name JCPlanet --server XianSelecting an Autologin
RSBot.exe -p profile -a(--select-autologin) usernameRSBot.Server
A background process for bots to connect to and for the controller to relay messages to. Everything is logged onto
User/Logs/Environment/Server.exe.RSBot.Server -x(--pipename) RSBotIPCRSBot.Controller
Command line interface to control the bot without any GUI.
RSBot.Controller.exe -x RSBotIPC -p(--profile) profile -c(--command) command -d(--data) dataRSBot.Controller.exe -x RSBotIPC -a(--all) -c command -d dataCommands are:
Roughly Desired Architecture
Multiple ipc servers can coexist, they should be named differently.
Diagram of Operations
sequenceDiagram participant CLI as RSBot.Controller.exe participant Server as RSBot.Server.exe participant Bot as RSBot.exe Server->>Server: Start and create Named Pipe Bot->>Server: Connect to Named Pipe Server-->>Bot: Connection established Bot->>Server: Send RegisterBot command Server->>Server: Register Bot instance with profile CLI->>Server: Connect to Named Pipe Server-->>CLI: Connection established CLI->>Server: Send GetInfo command Server->>Bot: Route GetInfo command Bot->>Bot: Process GetInfo command (gather info) Bot->>Server: Send IpcResponse with info Server->>CLI: Route IpcResponse CLI->>CLI: Display response CLI->>Server: Disconnect Server-->>CLI: Acknowledge disconnect