
Originally Posted by
DonJuan13
Have you tried the PluginUtils.Delay method? Since waiting to use the portals on each client worked for you maybe it would work to just simply delay the sending of each Packet. I assume you store your clients in some sort of dictionary or array (i.e. _clients) so maybe something to the effect of:
Code:
foreach (cl in _clients) {
PluginUtils.Delay(1500, () =>
{
SendReconPacket(cl); //insert magical method for sending the reconnect packet
}
}
Or perhaps just wait for the HELLO packet of the previous client before sending the next reconnect packet.
If you want to send me the code I can try to better help. (Sorry for crappy syntax. Mainly Java developer + not on main computer = fakeittillimakeit)
In addition can you print out each of the reconnect packets that you send and see if all the values seem to be correct.
I kind of already solved the issue by waiting for the proxy client_connected listener to see if the client connected or not before sending another useportalpacket (sent when you use a portal).
I'm good with my plugin now, it's just that I want to make this a tiny bit faster, and hopefully I can gain some experience with krelay during this process.
However, by going through the code, I think the reconnect packets are fine, it's just that the way krelay is set up makes it unable to process two reconnects at the same time.
What seems to be happening is that krelay modifies the reconnect packets to make them connect to localhost (this part is fine). The first client connects, and the variable Proxy.defTempServer (which i think stands for default temporary server) has the ip address 54.168.179.62 (one of the servers). When the second client connects while the first has not finished the variable is not the same (the ip becomes the nexus ip), which might be causing the problem. Every time if I wait for the first client to finish, the variable is always the same.
The reconnect packets are same except for their time and i think key.
Maybe kronks might know more, just don't know how to contact him.
P.S. I'm mostly java too, can't really find a java proxy.