Updated SubData (markdown)

ME1312 2018-05-29 11:34:45 -04:00
parent 87d4a7cb91
commit d39f658949

@ -1,7 +1,7 @@
SubData, in a similar fashion to the [Plugin Messaging Channel (PMC)](https://www.spigotmc.org/wiki/bukkit-bungee-plugin-messaging-channel/), allows for the various components in your SubServers network to communicate with each other. However, unlike the PMC, it doesn't rely on a player's connection to send and receive data. This ultimately makes it a better choice to use if you need to send data which is unrelated to players.
## SubData Direct
This is the current edition of SubData. SubServers.Bungee opens a TCP port (default 4391) for other programs to communicate to each other with via JSON Packets. The packets look like this but they're minified:
This is the current edition of SubData. SubServers.Bungee opens a TCP port (default 4391) for other programs to communicate to each other with via JSON Packets. The packets look like this before they are minified and converted to Base64:
```
{
"f": "/127.0.0.1:54366",
@ -20,7 +20,7 @@ This is the current edition of SubData. SubServers.Bungee opens a TCP port (defa
Of course, SubAPI handles this all for you, but if you are looking to create a custom application this information may be useful to you. The SubAPI way to create a packet is to create a new class and implement `PacketIn` and/or `PacketOut` and register it via `SubData.registerPacket()`.
### Encryption
SubData supports AES 128, 192, and 256 bit password-based encryption if you need to turn up the security. It does this by encrypting the previously mentioned JSON packets with AES and converting the output to Base64 for compatibility reasons. Here is an example of what this type of encryption can do for you: (256 bit AES)<br>
SubData supports AES 128, 192, and 256 bit password-based encryption if you need to turn up the security. It does this by encrypting the previously mentioned JSON packets with AES before converting the output to Base64. Here is an example of what this type of encryption can do for you: (256 bit AES)<br>
`{"v":"2.11.0a","h":"SubDownloadLang"}`<br>
This simple language file request now becomes:<br>
`IKT1NyjogzyN4NipY2S5QPBHs1yHisCTtSeYsKlRGua//JaBuL6JGDQX+YlllY6TgO8FuwplFVwr/L821rdNLhAHNO7F2plutLZ7/+L+sXYNQjEd+fvPHio=`<br>