Nick Gammon said: *The player connects, the server queries, gets told "no", and *then* the player installs the plugin. However the plugin doesn't work because the negotiation is already over.
We already deal with this now; it's an inherent feature of the protocols I know of that the query sent by the server is sent on connect. Simply ensure that the protocol plugin is installed beforehand. Out of all the problems ATCP-users have had during troubleshooting, this was not one of them.
Nick Gammon said: *The player installs the plugin first, then connects, and all works OK, until the player removes the plugin. Now the server is committed to sending the extra stuff, but the client now ignores it, as the plugin is gone.
There's not much you can do about that anyways, unless you mark a plugin as a 'protocol' plugin somehow and prevent users from uninstalling it. My webclient idea would have made protocol plugins entirely separate components in the first place, which I think nicely deals with that, however we don't really have that option here. I don't think it's too much to ask that users not disable the plugin, just like they have to make sure it's enabled before connecting.
Nick Gammon said: *The plugin developer keeps re-installing the plugin, causing the plugin to be starting from scratch, but the server thinks it has been there for a while.
Ctrl+Shift+K, Ctrl+K: disco/reco. It can be a little annoying, but it's rather difficult to avoid (it's something that affects more than protocols in general), and once you get used to it, it becomes second nature.
Nick Gammon said: How do you solve that now, with the ATCP plugins? Or do they only work properly if you have them installed before connecting?
Generally speaking, the ATCP-using plugins can generally be developed like any other plugin; the disco/reco trick is only necessary when the changes affect protocol-relevant details. With my newer versions of the ATCP plugins (not yet released, I'm hoping to see PPI through first since they rely on it), the ATCP plugin handles all protocol details, and the other plugins just tell it what they want to listen for. I achieve this by enabling all ATCP packages straight off, and just forwarding the received messages to any listeners. It's safe to do this because ATCP doesn't generally require responses or expect certain behavior: it's largely used as an event-push protocol.
I would imagine that ZMP would require a slightly different approach due to the nature of the packages it exposes. It's likely that a ZMP plugin would itself only implement the core package, and leave other plugins to implement other packages. I suppose it would be something of a "ZMP plugin suite", a set of plugins in a "structured .plugin folder" like I laid out in a topic here recently, with one primary plugin that enables/disables the other plugins on demand on connection. That would allow maximum extensibility in the face of new packages. |