Closed TheSpartaPT closed 4 years ago
Hi, I did make the package for Minecraft. Since I wasn't sure if it works with other games I didn't advertise it as such. I'll be looking into the differences of the Minecraft and Source RCON protocol. Maybe there's an easy fix to make it work with both.
One major difference is that some game server use UDP instead of TCP for the protocol.
GoldSource (CS 1.6, HL, etc.) used/uses UDP The newer Source (CS Source, CS GO, HL 2, etc.) uses TCP, so I think it's pretty much the same as Minecraft which seems to be only an implementation of the Source Rcon, but I guess I can test it out and give you some feedback
Tested it with a Squad server
seems to work fine but the end
event never seemed to be fired, everything else seems to work
I think that TCP reset should be handled better. At the moment it only fires the error
event, but not end
. The close
event of the socket is probably better suited, as it also fires when the connection is not properly closed.
This implementation doesn't quite follow the RCON protocol as documented on the Valve Developer Pages. The most important differences are
Further more, out of order results of commands is correctly handled (Factorio does this) something the Valve document says can't happen.
Honestly this whole protocol feels like it was hastily cobbled together a late afternoon by a drunk developer. It's got a 32-bit payload length field that cannot contain a length greater than than 12 bits, it's got space for 4 billion different payload types yet it still recycles payload IDs and fails to mark the end of multi packet responses. I'm appalled than games actually use this trash.
I'm gonna close this issue. And to answer the question I guess this library is more targeted toward Minecraft servers as that's what I made it for but any small changes to make it more compatible with other games are welcome.
Is this only for Minecraft or does it work with any game? You seem to advertise it as being only for Minecraft, but the name of the package kind of implies that this is a client for the protocol as a whole. So yeah I'm confused and i'd like an answer so I don't waste my time trying to use it and failing.