-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A few questions #2
Comments
I realized I haven't updated to the latest Proton version for this repository. It should be fixed in the latest commit. Before the current version, Proton needed a reference to your plugin (hence this, this).
Namespace and Subject essentially define the datatype you want to send and receive. In the example you showed, if you send an In broad terms, namespace should refer to your plugin itself or your organization. Subject should be specific to the type of message your sending and receiving. You can read more here: https://proton-1.gitbook.io/proton/getting-started#sending-your-first-message
You can. However, you only really need a copy of Proton running on bungee if you need access to the proxy. Otherwise, you can just communicate between all the spigot servers the same way. Here's an example of where I used Proton on both Spigot and Bungee: https://github.com/mcgrizzz/DynamicProxy/tree/main/src/main/java/me/drepic/dynamicproxy
Look at DynamicProxy link above as example for use on spigot and bungee.
I'm not sure what getSyncManager is referring to here.
If you send a Example: Spigot Server:
Bungee Proxy
In this case, you will get an error when bungee receives a message because the datatypes do not match and Proton does not know how to convert a The same idea applies even if you have the same class name, but a different class constructor. It will throw an error if the NOTE: Proton can send most datatypes.
For more detail, you can generally find it on the documentation page: https://proton-1.gitbook.io/proton/getting-started If something is not clear, I will have to update it. |
Ah ok that makes sense.
I've been defining the variable as "sync{type}", so it's easier for me to remember (i'm using it to sync stuff in this case). In that usage it's a method to get ProtonManager variable. Is
Closing because it's pretty much resolved, you are an absolute legend and thanks for clearing all of this up :) |
I know this is closed, but I just wanted to reply to your .broadcast() question. It is not necessarily correct to use broadcast to send a message to a specific server. In this case, it would be better to send directly to the proxy (unless you have more than one proxy). However, it will still work if you only listen for that specific message on the proxy. The only difference is that, if you use broadcast, all your other servers will receive the message and manually filter out the message themselves. |
So I have been looking into testing this but i need some info;
What is the purpose of using
(this, this)
and could it just be done as(this)
?ProtonExamples/src/main/java/me/drepic/protonexamples/networkchat/NetworkChat.java
Line 17 in 46bb47d
What do the namespace & subject mean and what is the intended usecase for both?
ProtonExamples/src/main/java/me/drepic/protonexamples/networkchat/NetworkChat.java
Lines 30 to 33 in 46bb47d
Could I use this to have bungee and spigot communicate via this scenario:
^ if so, how would i setup something like this? would it be like:
then this in the bungee plugin (if so, would i need a PlayerMessage object in the bungee plugin aswell and would it need the same args or can it be different?):
By different PlayerMessage args I mean could I use this:
Thanks in advance :)
The text was updated successfully, but these errors were encountered: