startmethods in the
Queryclass. If the query port isn't already open, it will start listening for queries on the specified port.
SocketAddressof the sender in addition to the session ID that they initiated the request with. This information can be used to identify who is sending a request. Additionally, each event is cancellable, meaning that if you don't want to send a response you can simply cancel the event. This is a powerful system that enables you to keep a query system open for obtaining arbitrary information from your server without letting everybody access the query system.
BasicQueryEventis called when the requester is asking for basic information about the server. This event uses the
BasicQueryResponseclass to write a fixed set of data, each of which needs to be filled in so that responses can be parsed correctly.
FullQueryEventis called when the requester is asking for full information about the server. This event uses the
FullQueryResponseclass to write an arbitrary set of data in a key-value format in addition to a list of online players. There are some keys that should be filled in as standard. These are set by default and can be edited using the
putmethod that accepts a
QueryKey, this being an enum containing the default key-value mappings. Other arbitrary mappings can be inserted using the other